Re: [HACKERS] optimizer and type question

Поиск
Список
Период
Сортировка
От Taral
Тема Re: [HACKERS] optimizer and type question
Дата
Msg-id 99032217565000.10257@taral.dobiecenter.com
обсуждение исходный текст
Ответ на optimizer and type question  (Erik Riedel <riedel+@CMU.EDU>)
Список pgsql-hackers
On Mon, 22 Mar 1999, you wrote:
>Question 1 - is intltsel the right thing for selectivity on dates?

I think so... dates are really special integers.

>Question 2 - is this right?  Is the intent for 0 to serve as a
>"wildcard", or should it be inserting an entry for each operation
>individually?

This looks wrong... but I'm not proficient enough to know.

>Question 3 - is there any inherent reason it couldn't get this right?
>The statistic is in the table 1992 to 1998, so the '1998-09-02' date
>should be 90-some% selectivity, a much better guess than 33%.

I would imagine that 33% is a result due to the lack of the statistics match.

>OK, so let's say we treat 0 as a "wildcard" and stop checking for
>1096.  Not we let gethilokey() return the two dates from the statistic
>table.  The immediate next thing that intltsel() does, near lines 122
>in selfuncs.c is call atol() on the strings from gethilokey().  And
>guess what it comes up with?

This is ridiculous... why does gethilokey() return a string for a field that is
internally stored as an integer?

*sigh* Just more questions...

Taral


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] to text or not to text
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] optimizer and type question