pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: Joel Fradkin <jfradkin@wazagua.com>
To: pgsql-sql@postgresql.org
Subject: Re: MSSQL versus Postgres timing
Date: Tue, 01 Feb 2005 22:47:19 +0100
Message-ID: <opsljf45pqth1vuj@musicbox> (raw)
In-Reply-To: <000001c5089b$63d56650$797ba8c0@jfradkin>
References: <000001c5089b$63d56650$797ba8c0@jfradkin>



> 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



view thread (11+ messages)  latest in thread

Message-ID: <opsljf45pqth1vuj@musicbox>
Permalink:  ../opsljf45pqth1vuj@musicbox/
Also on:    postgresql.org/message-id/opsljf45pqth1vuj@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@boutiquenumerique.com, jfradkin@wazagua.com
  Subject: Re: MSSQL versus Postgres timing
  In-Reply-To: <opsljf45pqth1vuj@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox