Another small point:
Even after I do:
set enable_seqscan = off;
explain delete from masterfti where masterfti.id = master.id and
master.retrieved < '31-Oct-2001';
NOTICE: QUERY PLAN:
Nested Loop (cost=100000000.00..100000511.92 rows=163 width=14)
-> Seq Scan on masterfti (cost=100000000.00..100000000.00 rows=1 width=10)
-> Index Scan using master_pkey on master (cost=0.00..509.89 rows=163
width=4)
EXPLAIN
The full index (both fields) exists on MasterFTI. Why is a delete doing a
dequential scan on it, even after it has been told not to?
However, just after doing a vacuum analyze:
set enable_seqscan = on;
SET VARIABLE
testdb=> explain delete from masterfti where masterfti.id = master.id and
master.retrieved < '31-Oct-2001';
NOTICE: QUERY PLAN:
Hash Join (cost=2472.52..94079.09 rows=96051 width=14)
-> Seq Scan on masterfti (cost=0.00..26610.10 rows=1624010 width=10)
-> Hash (cost=2465.31..2465.31 rows=2886 width=4)
-> Index Scan using master_retrieved_index on master
(cost=0.00..2465.31 rows=2886 width=4)
EXPLAIN
set enable_seqscan = on doesn't make any difference.
Can someone explain to me what is happening?
I'm running PostgreSQL 7.1.3 on a RH 7.0 based system.
Thanks.
Gordan