Re: FW: Query length limitation in postgres server > 8.2.9

From: <jacob(at)aers(dot)ca>
To: <Matthew(dot)Hartman(at)krcc(dot)on(dot)ca>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Date: 2009-07-09 18:20:27
Message-ID: 6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

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

> From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-
> owner(at)postgresql(dot)org] On Behalf Of jacob(at)aers(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-07-09 18:28:59 Re: FW: Query length limitation in postgres server > 8.2.9
Previous Message jacob 2009-07-09 18:16:26 Re: FW: Query length limitation in postgres server > 8.2.9