Re: Selectivity estimation for inet operators

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Selectivity estimation for inet operators
Дата
Msg-id 16889.1427923145@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Selectivity estimation for inet operators  (Emre Hasegeli <emre@hasegeli.com>)
Список pgsql-hackers
Emre Hasegeli <emre@hasegeli.com> writes:
> [ inet-selfuncs-v14.patch ]

After further reflection I concluded that the best way to deal with the
O(N^2) runtime problem for the join selectivity function was to set a
limit on the number of statistics values we'd consider, as was discussed
awhile back IIRC.  We can easily consider just the first N values of the
MCV arrays, since those are sorted by decreasing frequency anyway.  For
the histogram arrays, taking every K'th value seems like the thing to do.

I made the limit be 1024 elements as that seemed to give an acceptable
maximum runtime (a couple hundred msec on my machine).  We could probably
reduce that if anyone feels the max runtime needs to be less.

I had to drop the idea of breaking out of the histogram loop early as that
didn't play nicely with the decimation logic, unfortunately.

Anyway, pushed.  Thanks for your perseverance on this!
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christoph Berg
Дата:
Сообщение: Re: Re: [pgsql-pkg-debian] Updated libpq5 packages cause connection errors on postgresql 9.2
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade needs postmaster [sic]