Search Postgresql Archives

Re: Disable an index temporarily

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/04/14 12:08, Thomas Kellerer wrote:
>> Example:
>>
>>      btree (fmb_id, action_type)
>>      btree (fmb_id)
>>
[...]
> 
> Btw: in the above example the second one is definitely not needed.
> Any query that uses the second one (single column) can also use the
> first one.

I know.

But the single column index is 3534 MB the 2-column one 4963 MB. The
number of rows per distinct fmb_id is very small, usually 1 or 2. So, if
a query looks for "fmb_id=A and action_type=B", it has to filter out
only one row if the first index is not available. Hence, I thought maybe
the lower size of the index and the higher compactness per page could
outweigh the more direct access provided by the 2-column index.

I am quite sure there is no query that qualifies for an index-only scan
on the 2-column index.

Torsten


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux