Вот есть такой запрос:
explain delete from stat_eri_form where (h<24 and date_ < '2010-09-01' and cellid <> -1) returning *
Запускаю на основном сервере с данными, получаю такую хрень:
explain delete from stat_eri_form where (h<24 and date_ < '2010-09-01' and cellid <> -1) returning *
Цитата |
"Seq Scan on stat_eri_form (cost=0.00..1154560.36 rows=10386350 width=6)" " Filter: ((h < 24) AND (date_ < '2010-09-01'::date) AND (cellid <> (-1)))" |
Цитата |
"Index Scan using eri_form on stat_eri_form (cost=0.00..8.51 rows=1 width=6)" " Index Cond: ((date_ < '2010-09-01'::date) AND (h < 24))" " Filter: (cellid <> (-1))" |
explain
select * from block_181 where date_ >= '2011-02-07'
"Index Scan using date_only_181 on block_181 (cost=0.00..2547059.23 rows=47061945 width=20)"
" Index Cond: (date_ >= '2011-02-07'::date)"
explain
select * from block_181 where date_ <= '2011-02-07'
"Seq Scan on block_181 (cost=0.00..4652132.15 rows=112683813 width=20)"
" Filter: (date_ <= '2011-02-07'::date)"
Цитата |
explain select * from block_181 where date_ > '2011-02-06' "Index Scan using date_only_181 on block_181 (cost=0.00..2547059.23 rows=47061945 width=20)" " Index Cond: (date_ > '2011-02-06'::date)" |