Re: MSSQL versus Postgres timing - Mailing list pgsql-sql

From PFC
Subject Re: MSSQL versus Postgres timing
Date
Msg-id opsljf45pqth1vuj@musicbox
Whole thread Raw
In response to Re: MSSQL versus Postgres timing  ("Joel Fradkin" <jfradkin@wazagua.com>)
List 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


pgsql-sql by date:

Previous
From: "Joel Fradkin"
Date:
Subject: Re: MSSQL versus Postgres timing
Next
From: Tom Lane
Date:
Subject: Re: MSSQL versus Postgres timing