From: Jessica Richard <rjessil@yahoo.com>
To: Charles Duffy <charles.duffy@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: slow delete...
Date: Fri, 4 Jul 2008 05:36:40 -0700 (PDT)
Message-ID: <310112.61618.qm@web56415.mail.re3.yahoo.com> (raw)
thanks a lot. I imagine this will help me a lot. I will give it a try!!!
One more question: in the explain output, what is that "Bitmap Heap Scan on test"?, is it a bad thing (a table scan)? I would love to see the index scan instead of this Heap scan... what does "Heap Scan" actually do here?
Bitmap Heap Scan on test (cost=2110.49..10491.57 rows=79766 width=6)
Recheck Cond: ((cola)::text = 'abc'::text)
-> Bitmap Index Scan on test_cola_idx (cost=0.00..2090.55 rows=79766 width=0)
Index Cond: ((cola)::text = 'abc'::text)
(4 rows)
Thanks again,
Jessica
----- Original Message ----
From: Charles Duffy <charles.duffy@gmail.com>
To: Jessica Richard <rjessil@yahoo.com>
Cc: pgsql-admin@postgresql.org
Sent: Friday, July 4, 2008 3:17:43 AM
Subject: Re: [ADMIN] slow delete...
> by the way, there is a foreign key on another table that references the
> primary key col0 on table test.
>
Try putting an index on the FK column in the other table. Analyse the
table. Test by starting a transaction then
issuing: explain analyze delete from test where cola = 'abc'. Should be faster.
Charles Duffy
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rjessil@yahoo.com, charles.duffy@gmail.com
Subject: Re: slow delete...
In-Reply-To: <310112.61618.qm@web56415.mail.re3.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox