Re: performance question (something to do w/

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: performance question (something to do w/
Дата
в 15:00:20
Msg-id
28288.1147111196@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
performance question (something to do w/ parameterized stmts?, wrong index types?) Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ Mark Lewis <mark.lewis@mir3.com>
Re: performance question (something to do w/ "Jim C. Nasby" <jnasby@pervasive.com>
Re: performance question (something to do w/ Kenneth Marshall <ktm@it.is.rice.edu>
Re: performance question (something to do w/ Tom Lane <tgl@sss.pgh.pa.us>
Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: Big IN() clauses etc : feature proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: Big IN() clauses etc : feature proposal Christian Kratzer <ck-lists@cksoft.de>
Re: Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: Big IN() clauses etc : feature proposal Christian Kratzer <ck-lists@cksoft.de>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] Big IN() clauses etc : feature proposal Csaba Nagy <nagy@ecircle-ag.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Mitchell Skinner <mitch@arctur.us>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Scott Marlowe <smarlowe@g2switchworks.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Dawid Kuroczko" <qnex42@gmail.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] Big IN() clauses etc : feature proposal Nis Jorgensen <nis@superlativ.dk>
Re: [HACKERS] Big IN() clauses etc : feature proposal Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Markus Schaber <schabi@logix-tt.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Greg Stark <gsstark@mit.edu>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal Greg Stark <gsstark@mit.edu>
Re: [HACKERS] Big IN() clauses etc : feature proposal Martijn van Oosterhout <kleptog@svana.org>
Re: [HACKERS] Big IN() clauses etc : feature proposal "Jim C. Nasby" <jnasby@pervasive.com>
Re: [HACKERS] Big IN() clauses etc : feature proposal PFC <lists@peufeu.com>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ parameterized stmts?, wrong index types?) "Jim C. Nasby" <jnasby@pervasive.com>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ parameterized Tom Lane <tgl@sss.pgh.pa.us>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ parameterized Tom Lane <tgl@sss.pgh.pa.us>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ parameterized Tom Lane <tgl@sss.pgh.pa.us>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
Re: performance question (something to do w/ parameterized Tom Lane <tgl@sss.pgh.pa.us>
Re: performance question (something to do w/ parameterized Klint Gore <kg@kgb.une.edu.au>
Re: performance question (something to do w/ parameterized Jeffrey Tenny <jeffrey.tenny@comcast.net>
"Jim C. Nasby"  writes:
> On Mon, May 08, 2006 at 10:42:21AM -0700, Mark Lewis wrote:
>> Doing a SELECT with a large list of variables inside an IN runs slowly
>> on every database we've tested.  We've tested mostly in Oracle and
>> PostgreSQL, and both get very slow very quickly (actually Oracle refuses
>> to process the query at all after it gets too many bind parameters).
>> 
>> In our case, we have a (potentially quite large) set of external values
>> that we want to look up in the database.  We originally thought that
>> doing a single select with a large IN clause was the way to go, but then
>> we did some performance analysis on the optimal batch size (number of
>> items to include per IN clause), and discovered that for most databases,
>> the optimal batch size was 1.  For PostgreSQL I think it was 2.
>> 
>> The moral of the story is that you're probably better off running a
>> bunch of small selects than in trying to optimize things with one
>> gargantuan select.

> Ever experiment with loading the parameters into a temp table and
> joining to that?

Also, it might be worth re-testing that conclusion with PG CVS tip
(or 8.2 when it comes out).  The reimplementation of IN as = ANY that
I did a couple months ago might well change the results.

			regards, tom lane
В списке pgsql-performance по дате отправления
От: Jim C. Nasby
Дата:
От: Andrus
Дата:
FAQ