Skip site navigation (1) Skip section navigation (2)

Re: Slow inner join, but left join is fast

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeremy Haile" <jhaile(at)fastmail(dot)fm>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow inner join, but left join is fast
Date: 2007-01-10 19:22:35
Message-ID: 15190.1168456955@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Jeremy Haile" <jhaile(at)fastmail(dot)fm> writes:
> Another random idea - does PostgreSQL do any caching of query plans?

Only if the client specifies it, either by PREPARE or the equivalent
protocol-level message.  I dunno what client software you were using,
but I think few if any would PREPARE behind your back.  Might be worth
checking into though, if you've eliminated autovacuum.

Actually there's another possibility --- did you create any indexes on
the table in between?  CREATE INDEX doesn't do a full stats update, but
it does count the rows and update pg_class.reltuples.  But it's hard to
believe that'd have caused as big a rowcount shift as we see here ...

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Jeremy HaileDate: 2007-01-10 19:26:55
Subject: Re: Slow inner join, but left join is fast
Previous:From: Jeremy HaileDate: 2007-01-10 18:44:37
Subject: Re: Slow inner join, but left join is fast

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group