Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Limit ile perforfance çok kötü


  • 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: Tue, 19 May 2009 23:01:51 +0300
  • Message-id: <4A13102F.3020609@ofisiletisim.com> <text/plain>

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: namik.vcf
Description: Vcard



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group