Re: Index scan cost calculation
От | Tom Lane |
---|---|
Тема | Re: Index scan cost calculation |
Дата | |
Msg-id | 6786.1448562387@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Index scan cost calculation (Glyn Astill <glynastill@yahoo.co.uk>) |
Список | pgsql-performance |
Glyn Astill <glynastill@yahoo.co.uk> writes: >> From: Tom Lane <tgl@sss.pgh.pa.us> >> The problem will probably go away by itself as your table grows, but >> if you don't want to wait, you might want to reflect on which of the index >> columns might be (partially?) functionally dependent on the other columns, >> and whether you could redesign the key structure to avoid that. > Many thanks for the explanation, is such a functional dependency assumed purely based optimistically on statistics gatheredby analyze? Well, the point is that the selectivities associated with the individual WHERE clauses are assumed independent, which allows us to just multiply them together. If they're not really independent then multiplication gives a combined selectivity that's too small. But without cross-column statistics there's not much we can do to get a better estimate. regards, tom lane
В списке pgsql-performance по дате отправления: