Re: IN list processing performance (yet again)

From: Dave Tenny <tenny(at)attbi(dot)com>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: IN list processing performance (yet again)
Date: 2003-05-28 17:58:14
Message-ID: 3ED4F8B6.7030905@attbi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

A join isn't an option, these elements come a a selection of entity ID's
that are specific to some client context.
Some other people suggested joins too.

Consider it something like this, say there's a database that represents
the entire file system content
of a set of machines, hundreds of thousands of files. A single user
wants to do something
related to the ID's of 3000 files. The requests for those 3000 files
can be built up in a number of ways,
not all of which rely on data in the database. So I need to retrieve
data on those 3000 files using IN lists or some alternative.

Dave

Shridhar Daithankar wrote:

>On Wednesday 28 May 2003 18:21, Dave Tenny wrote:
>
>
>>Having grepped the web, it's clear that this isn't the first or last
>>time this issue will be raised.
>>
>>My application relies heavily on IN lists. The lists are primarily
>>constant integers, so queries look like:
>>
>>SELECT val FROM table WHERE id IN (43, 49, 1001, 100002, ...)
>>
>>
>
>How do you derive this list of number? If it is from same database, can you
>rewrite the query using a join statement?
>
>HTH
>
> Shridhar
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chad Thompson 2003-05-28 17:59:49 Re: >24 hour restore
Previous Message Andrew Sullivan 2003-05-28 16:24:55 Re: >24 hour restore