Re: Partial index and query plan

Поиск
Список
Период
Сортировка
От Aleksandr Vinokurov
Тема Re: Partial index and query plan
Дата
Msg-id b048c51b0708220802u24d78e15i916bf7c52a303280@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Partial index and query plan  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-sql
Scott Marlowe wrote:
>
> I don't see the issue here.  The index being used is the same partial
> index you created.  Maybe it's just a question of semantics?
>

As I understand final filter is:a)  pointed at the index creationb)  is redundant as all the indexed records have
action<> 0.
 

So checking of it is a time wasting.

And the plan should be this:

>> Limit  (cost=0.00..3.05 rows=1 width=8) (actual time=4.798..4.798
>> rows=0 loops=1)
>>    ->  Index Scan using indx_date_action12_uid_user_his on
>> user_history  (cost=0.00..6.10 rows=2 width=8) (actual
>> time=4.791..4.791 rows=0 loops=1)
>>          Index Cond: ((date > '2007-08-18 14:33:40.60664'::timestamp
>> without time zone) AND (date <= '2007-08-18 16:30:00'::timestamp
>> without time zone) AND (uid = 138658))


I suggest that this 'Filter' check will not be noticed as it always
return TRUE, and so will be checked only once, -- because of the
"limit 1". :)

But thanks, Aleksandr.


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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Partial index and query plan
Следующее
От: "George Pavlov"
Дата:
Сообщение: minimum bounding circle for a triangle/polygon