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 creation b) 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. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org