This is a discussion on Re: MSSQL versus Postgres timing within the pgsql Sql forums, part of the PostgreSQL category; --> > CREATE OR REPLACE VIEW viwassoclist AS > SELECT a.clientnum, a.associateid, a.associatenum, a.lastname, > a.firstname, > jt.value AS jobtitle, ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster |