Re: [PERFORM] Statistics issue

2008-05-31 Thread Tom Lane
Vlad Arkhipov <[EMAIL PROTECTED]> writes: > EXPLAIN ANALYZE > SELECT * > FROM i > WHERE d BETWEEN '2007-05-12' AND '2007-05-12' > Index Scan using i_d on i (cost=0.00..2.39 rows=1 width=402) (actual > time=0.053..4.284 rows=1721 loops=1) > Index Cond: ((d >= '2007-05-12'::date) AND (d <= '2007-

[PERFORM] Statistics issue

2008-05-30 Thread Vlad Arkhipov
I have a big table that is used in many queries. Most used index is created on date field. Number of records in this table when date field is saturday is about 5 times smaller than other days, on sunday this number is always 0. Statistics target is 1000. Many queries have problems when condition o