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

From: "Hartman, Matthew" <Matthew(dot)Hartman(at)krcc(dot)on(dot)ca>
To: <jacob(at)aers(dot)ca>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Date: 2009-07-09 17:58:18
Message-ID: 366642367C5B354197A1E0D27BC175BD02259883@KGHMAIL.KGH.ON.CA
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-07-09 18:05:32 Re: FW: Query length limitation in postgres server > 8.2.9
Previous Message jacob 2009-07-09 17:53:14 Re: FW: Query length limitation in postgres server > 8.2.9