Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Admin > Re: slow delete...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 5121 of 5549
Post > Topic >>

Re: slow delete...

by rjessil@[EMAIL PROTECTED] (Jessica Richard) Jul 4, 2008 at 05:36 AM

--0-1834116338-1215175000=:61618
Content-Type: text/plain; charset=us-ascii

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@[EMAIL PROTECTED]
>
To: Jessica Richard <rjessil@[EMAIL PROTECTED]
>
Cc: pgsql-admin@[EMAIL PROTECTED]
 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@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



      
--0-1834116338-1215175000=:61618
Content-Type: text/html; charset=us-ascii

<html><head><style type="text/css"><!-- DIV {margin:0px;}
--></style></head><body><div style="font-family:times new roman, new york,
times, serif;font-size:12pt"><div>thanks a lot. I imagine this will help me
a lot. I will give it a try!!!<br><br>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?<br><br>&nbsp;Bitmap Heap
Scan on test&nbsp; (cost=2110.49..10491.57 rows=79766
width=6)<br>&nbsp;&nbsp; Recheck Cond: ((cola)::text =
'abc'::text)<br>&nbsp;&nbsp; -&gt;&nbsp; Bitmap Index Scan on
test_cola_idx&nbsp; (cost=0.00..2090.55 rows=79766
width=0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Index Cond:
((cola)::text = 'abc'::text)<br>(4 rows)<br><br>Thanks
again,<br>Jessica<br></div><div style="font-family: times new roman,new
york,times,serif; font-size: 12pt;"><br><div
 style="font-family: arial,helvetica,sans-serif; font-size: 13px;">-----
Original Message ----<br>From: Charles Duffy
&lt;charles.duffy@[EMAIL PROTECTED]
>To: Jessica Richard
&lt;rjessil@[EMAIL PROTECTED]
>Cc: pgsql-admin@[EMAIL PROTECTED]
>Sent:
Friday, July 4, 2008 3:17:43 AM<br>Subject: Re: [ADMIN] slow
delete...<br><br>
&gt; by the way, there is a foreign key on another table that references
the<br>&gt; primary key col0 on table test.<br>&gt;<br><br>Try putting an
index on the FK column in the other table. Analyse the<br>table. Test by
starting a transaction then<br>issuing: explain analyze delete from test
where cola = 'abc'. Should be faster.<br><br><br>Charles Duffy<br><br>--
<br>Sent via pgsql-admin mailing list (<a
ymailto="mailto:pgsql-admin@[EMAIL PROTECTED]
"
href="mailto:pgsql-admin@[EMAIL PROTECTED]
">pgsql-admin@[EMAIL PROTECTED]
>)<br>To
make changes to your subscription:<br><a
href="http://www.postgresql.org/mailpref/pgsql-admin"
target="_blank">http://www.postgresql.org/mailpref/pgsql-admin</a><br></div></div></div><br>



      </body></html>
--0-1834116338-1215175000=:61618--
 




 1 Posts in Topic:
Re: slow delete...
rjessil@[EMAIL PROTECTED]  2008-07-04 05:36:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 17:04:55 CST 2008.