slow query - Mailing list pgsql-sql

From Sumeet
Subject slow query
Date
Msg-id 7539aebb0704042017l70d83d53u9c2e5105620a3fa7@mail.gmail.com
Whole thread Raw
Responses Re: slow query  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
Hi all<br /><br />I ran a simple query like the one displayed below and it takes a lot of time to execute on this
table.<br/>This table has 48 million records....and i worry about this table a lot coz i need to perform join on this
<br/>table with some other table having around 13 million records....I've tried vacuuming this table many time<br />but
dinthelp me much...is there any other trick to speed up this table....once i tried deleting and restoring a table <br
/>andit worked perfectly fine for a small table of size upto 5-6 million records<br /><br />sm=> explain analyze
select* from ma limit 10;<br />                                                             QUERY
PLAN                                                             <br
/>-------------------------------------------------------------------------------------------------------------------------------------<br
/> Limit (cost=0.00..0.45 rows=10 width=76) (actual time=21985.292..22204.340 rows=10 loops=1) <br />   ->  Seq Scan
onma  (cost=0.00..2181956.92 rows=48235392 width=76) (actual time=21985.285..22204.308 rows=10 loops=1)<br /> Total
runtime:22204.476 ms<br />(3 rows)<br /><br clear="all" /><br />-- <br />Thanks,<br />Sumeet  

pgsql-sql by date:

Previous
From: Paul Lambert
Date:
Subject: Re: Moving a simple function to pl/pgsql (Novice question)
Next
From: Bryce Nesbitt
Date:
Subject: Re: Very slow DELETE on 4000 rows of 55000 row table