Re: FW: Query length limitation in postgres server > 8.2.9 - Mailing list pgsql-sql

From Tom Lane
Subject Re: FW: Query length limitation in postgres server > 8.2.9
Date
Msg-id 4566.1247164995@sss.pgh.pa.us
Whole thread Raw
In response to Re: FW: Query length limitation in postgres server > 8.2.9  (<jacob@aers.ca>)
List pgsql-sql
<jacob@aers.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


pgsql-sql by date:

Previous
From:
Date:
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Next
From: Marcin Krawczyk
Date:
Subject: skip if latter value equal