From: | PFC <lists(at)boutiquenumerique(dot)com> |
---|---|
To: | "Joel Fradkin" <jfradkin(at)wazagua(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: MSSQL versus Postgres timing |
Date: | 2005-02-01 21:47:19 |
Message-ID: | opsljf45pqth1vuj@musicbox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> CREATE OR REPLACE VIEW viwassoclist AS
> SELECT a.clientnum, a.associateid, a.associatenum, a.lastname,
> a.firstname,
> jt.value AS jobtitle, l.name AS "location", l.locationid AS
> mainlocationid,
> l.divisionid, l.regionid, l.districtid, (a.lastname::text || ', '::text)
> ||
> a.firstname::text AS assocname, a.isactive, a.isdeleted
> FROM tblassociate a
> LEFT JOIN tbljobtitle jt ON a.jobtitleid = jt.id AND
> jt.clientnum::text =
> a.clientnum::text AND 1 = jt.presentationid
> JOIN tbllocation l ON a.locationid = l.locationid AND
> l.clientnum::text =
> a.clientnum::text;
Try removing those ::text casts...
and creating two column indexes on the columns you use in your Join
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-02-01 21:53:23 | Re: MSSQL versus Postgres timing |
Previous Message | Joel Fradkin | 2005-02-01 20:19:19 | Re: MSSQL versus Postgres timing |