From: | Namık Güngör <namik(at)ofisiletisim(dot)com> |
---|---|
To: | pgsql-tr-genel(at)postgresql(dot)org |
Subject: | Limit ile perforfance çok kötü |
Date: | 2009-05-19 20:01:51 |
Message-ID: | 4A13102F.3020609@ofisiletisim.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-tr-genel |
Merhaba .
view a iki türlü select çektiğimde aşağıdaki sonuçları alıyorum. Limit
ile performans daha iyi olması gerekirken sonuçlar ortada.
fakat direkt tablolara select çektiğimde gayet iyi sonuçlar alıyorum.
Problem nerede olabilir?
İyi çalışmalar.
Namık Güngör.
explain analyze select * from udr.vhastabilgisi
"Hash Left Join (cost=1999.95..3520.22 rows=5355 width=205) (actual
time=158.595..186.311 rows=29 loops=1)"
" Hash Cond: ((hastakayit.hastano)::text = (kimlik.hastano)::text)"
" -> Seq Scan on hastakayit (cost=0.00..1.29 rows=29 width=62)
(actual time=0.017..0.097 rows=29 loops=1)"
" -> Hash (cost=744.31..744.31 rows=36931 width=147) (actual
time=156.484..156.484 rows=36931 loops=1)"
" -> Seq Scan on kimlik (cost=0.00..744.31 rows=36931
width=147) (actual time=0.008..61.705 rows=36931 loops=1)"
"Total runtime: 186.439 ms"
explain analyze select * from udr.vhastabilgisi limit 20
"Limit (cost=0.00..170.62 rows=20 width=205) (actual
time=148.563..2871.432 rows=20 loops=1)"
" -> Nested Loop Left Join (cost=0.00..45683.76 rows=5355 width=205)
(actual time=148.558..2871.357 rows=20 loops=1)"
" Join Filter: ((kimlik.hastano)::text = (hastakayit.hastano)::text)"
" -> Seq Scan on hastakayit (cost=0.00..1.29 rows=29 width=62)
(actual time=0.016..0.117 rows=20 loops=1)"
" -> Seq Scan on kimlik (cost=0.00..744.31 rows=36931
width=147) (actual time=0.013..50.014 rows=36931 loops=20)"
"Total runtime: 2871.578 ms"
Attachment | Content-Type | Size |
---|---|---|
namik.vcf | text/x-vcard | 419 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GÜNDÜZ | 2009-05-19 20:26:44 | Re: PgSQL Veri Kurtarma |
Previous Message | Devrim GÜNDÜZ | 2009-05-18 15:21:20 | Re: PgSQL Veri Kurtarma |