Re: FW: Query length limitation in postgres server > 8.2.9

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jacob(at)aers(dot)ca
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Date: 2009-07-09 18:43:15
Message-ID: 4566.1247164995@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<jacob(at)aers(dot)ca> writes:
> the data is insert once, read many so we should be fine on that side.

It's not only the insert side where you pay for so many partial indexes.
On every query of the table, the planner is going to examine every one
of those indexes and determine whether the index is potentially usable.
Which means it attempts to prove the truth of the index WHERE clause
given the query WHERE conditions. Most of those proof attempts are going
to fail for most queries, but not before eating a lot of planning
cycles.

On a read-mostly table, it'd probably be better to just eat the index
space needed to index the NULL entries. They aren't going to affect
search speed noticeably for non-NULL entries, I think.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Marcin Krawczyk 2009-07-10 07:22:51 skip if latter value equal
Previous Message jacob 2009-07-09 18:33:09 Re: FW: Query length limitation in postgres server > 8.2.9