Multi - table statistics

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Multi - table statistics
Date: 2009-07-01 09:15:14
Message-ID: 391885.88270.qm@web24608.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I query is using Index scan instead of Bitmap Index Scan because it "thinks" that the number of rows returned will be low (12). In fact, the number of rows returned is 120.

This happens because there are some WHERE conditions that check cross-tables values (something like taba.col1 < tabb.col2) . Since Postgresql doesn't know (I guess) anything about cross-table values statistics, how are the "rows" values calculated?

Is there any way I can force the planner to use bitmap index scan?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerd König 2009-07-01 09:20:45 cache reads vs. disk reads
Previous Message Albe Laurenz 2009-07-01 08:08:21 Re: High consumns memory