Performance Question Followup

From: Gordan Bobic <gordan(at)bobich(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Performance Question Followup
Date: 2001-11-07 13:02:28
Message-ID: 200111071302.fA7D2UM04281@sentinel.bobich.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Evelio Martínez 2001-11-07 13:08:44 alter table modify column ...
Previous Message Andy Hallam 2001-11-07 12:55:59 Re: LIKE predicate and '\' character