From: | Jose Maria Mencia Fernandez <jmencia(at)alimarket(dot)es> |
---|---|
To: | Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
Cc: | PostgreEs <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Ayuda con explain |
Date: | 2007-05-09 12:28:39 |
Message-ID: | 1178713719.3282.17.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Ok, ejecuto con explain analyze ...
y el resultado es:
Hash Join (cost=85.60..120.13 rows=125 width=246) (actual
time=9.298..19.990 rows=642 loops=1)
Hash Cond: ("outer".id_filiacion = "inner".id_filiacion)
-> Seq Scan on red_empresas emp (cost=0.00..30.07 rows=642
width=220) (actual time=0.042..4.460 rows=642 loops=1)
Filter: ((id_pais)::text = 'ESP'::text)
-> Hash (cost=83.95..83.95 rows=659 width=30) (actual
time=9.085..9.085 rows=662 loops=1)
-> Seq Scan on com_filiaciones fil (cost=0.00..83.95 rows=659
width=30) (actual time=0.029..5.586 rows=662 loops=1)
Filter: es_empresa
Total runtime: 22.831 ms
(8 filas)
Casualmente la mayoría de los registros poseen id_pais = 'ESP', ¿ es por
ello que el servidor decide aplicar Seq Scan en vez de usar índice?
From | Date | Subject | |
---|---|---|---|
Next Message | Jose Maria Mencia Fernandez | 2007-05-09 12:31:53 | Script Vacuum |
Previous Message | Agustin Casiva | 2007-05-09 12:09:47 | Re: min(ctid) |