pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jacob@aers.ca
To: Matthew.Hartman@krcc.on.ca
To: pgsql-sql@postgresql.org
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Date: Thu, 9 Jul 2009 11:20:27 -0700
Message-ID: <6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local> (raw)
In-Reply-To: <366642367C5B354197A1E0D27BC175BD02259883@KGHMAIL.KGH.ON.CA>
References: <6B5AF6293A289F45826220B17ABE7937FDB16C@BORON.aers.local>
	<6B5AF6293A289F45826220B17ABE7937FDB1C0@BORON.aers.local>
	<366642367C5B354197A1E0D27BC175BD02259883@KGHMAIL.KGH.ON.CA>

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

-----Original Message-----
From: Hartman, Matthew [mailto:Matthew.Hartman@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-owner@postgresql.org [mailto:pgsql-sql-
> owner@postgresql.org] On Behalf Of jacob@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




view thread (13+ messages)  latest in thread

Message-ID: <6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local>
Permalink:  ../6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local/
Also on:    postgresql.org/message-id/6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local

 · 

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: jacob@aers.ca, Matthew.Hartman@krcc.on.ca
  Subject: Re: FW: Query length limitation in postgres server > 8.2.9
  In-Reply-To: <6B5AF6293A289F45826220B17ABE7937FDB1CC@BORON.aers.local>

* 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