Being just the server admin I'll forward this thought on to the dev's
for consideration.

-----Original Message-----
From: Hartman, Matthew [mailto:matthew.hart...@krcc.on.ca] 
Sent: Thursday, July 09, 2009 10:58 AM
To: Jacob Bresciani; pgsql-sql@postgresql.org
Subject: RE: [SQL] FW: Query length limitation in postgres server >
8.2.9

> From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-
> ow...@postgresql.org] On Behalf Of ja...@aers.ca
> Sent: Thursday, July 09, 2009 1:53 PM
> 
> I've simplified the query to make it easier to look at.
> 
> This one doesn't use the index's and therefore takes about 11713ms to
> return.

Have you considered joining two tables, one of which is a UNION ALL sum
of the identifiers?

For example:

Select *
From MyTable
Inner join (
   Select 12345 as MyColumn
   Union all select 45678
   Union all select 7890
) as MyCriteria on MyTable.MyColumn = MyCriteria.MyColumn;


Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to