Re: [HACKERS] Big IN() clauses etc : feature proposal - Mailing list pgsql-performance

From Greg Stark
Subject Re: [HACKERS] Big IN() clauses etc : feature proposal
Date
Msg-id 8764kfz1iq.fsf@stark.xeocode.com
Whole thread Raw
In response to Big IN() clauses etc : feature proposal  (PFC <lists@peufeu.com>)
Responses Re: [HACKERS] Big IN() clauses etc : feature proposal
List pgsql-performance
PFC <lists@peufeu.com> writes:

>
>     I really like this. It's clean, efficient, and easy to use.
>
>     This would be a lot faster than using temp tables.
>     Creating cursors is very fast so we can create two, and avoid doing
> twice  the same work (ie. hashing the ids from the results to grab categories
> only once).

Creating cursors for a simple plan like a single sequential scan is fast
because it's using the original data from the table. But your example was
predicated on this part of the job being a complex query. If it's a complex
query involving joins and groupings, etc, then it will have to be materialized
and there's no (good) reason for that to be any faster than a temporary table
which is effectively the same thing.

--
greg

pgsql-performance by date:

Previous
From: Steve Atkins
Date:
Subject: Re: [GENERAL] Arguments Pro/Contra Software Raid
Next
From: Bruno Wolff III
Date:
Subject: Re: Arguments Pro/Contra Software Raid