Re: Estimating costs (was Functional Indices)
От | Tom Lane |
---|---|
Тема | Re: Estimating costs (was Functional Indices) |
Дата | |
Msg-id | 15848.990638561@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Estimating costs (was Functional Indices) (Martijn van Oosterhout <kleptog@svana.org>) |
Ответы |
Re: Estimating costs (was Functional Indices)
|
Список | pgsql-general |
Martijn van Oosterhout <kleptog@svana.org> writes: > I was thinking "average runlength". If this were 10 for example, when it > came to calculating the cost of the index scan, it would divide the > per-tuple cost by 10. > You can go the simple calculation method which would count the number of > times the value in a column was different than the previous value, then > divide that into the total number of tuples. That's not difficult to > implement. Unfortunately, it is difficult to implement, in fact impossible, given the new sampling-based implementation of ANALYZE. You could only discover that runs of identical keys exist if you were willing to examine every row, not just a statistical sample. Since this seems a rather specialized situation, I'm not eager to pay that high a price to recognize it ... regards, tom lane
В списке pgsql-general по дате отправления: