From: | Ever Daniel Barreto Rojas <ebarreto(at)nexusit(dot)com(dot)py> |
---|---|
To: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re[4]: velocidad en consulta con like |
Date: | 2007-06-02 19:39:28 |
Message-ID: | 1025508844.20070602153928@nexusit.com.py |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
edwin:
El 02/06/2007 a las 12:07 p.m., escribiste:
> Cuanto duraba la consulta original? En segundos?
> Puedes decirnos en cuanto mejoro esto?
olvidé de escribirte el explain analyze con el nuevo índice:
la consulta:
explain analyze
select *
from vw_personas
where per_nombres like 'EVER DA%' and per_apellidos like 'BARRETO R%'
el explain analyze:
"Sort (cost=11.54..11.55 rows=1 width=2252) (actual time=0.445..0.446 rows=1 loops=1)"
" Sort Key: persona.per_apellidos, persona.per_nombres"
" -> Nested Loop (cost=0.00..11.53 rows=1 width=2252) (actual time=0.315..0.412 rows=1 loops=1)"
" Join Filter: (persona.idecivil = ec.idecivil)"
" -> Nested Loop (cost=0.00..10.44 rows=1 width=2239) (actual time=0.301..0.383 rows=1 loops=1)"
" Join Filter: (persona.idtdoc = td.idtdoc)"
" -> Index Scan using idx_personas on persona (cost=0.00..9.38 rows=1 width=2203) (actual time=0.273..0.348 rows=1 loops=1)"
" Index Cond: (((per_apellidos)::text ~>=~ 'BARRETO R'::character varying) AND ((per_apellidos)::text ~<~ 'BARRETO S'::character varying) AND ((per_nombres)::text ~>=~ 'EVER DA'::character varying) AND ((per_nombres)::text ~<~ 'EVER DB'::character varying))"
" Filter: (((per_nombres)::text ~~ 'EVER DA%'::text) AND ((per_apellidos)::text ~~ 'BARRETO R%'::text))"
" -> Seq Scan on tipo_documento td (cost=0.00..1.03 rows=3 width=40) (actual time=0.006..0.011 rows=3 loops=1)"
" -> Seq Scan on estado_civil ec (cost=0.00..1.04 rows=4 width=17) (actual time=0.003..0.009 rows=4 loops=1)"
"Total runtime: 0.672 ms"
Cordiales saludos,
-------------------
Ever Daniel Barreto Rojas
e.mail: ebarreto(at)nexusit(dot)com(dot)py :: Nexus Information Technologies
web: www.nexusit.com.py
02/06/2007 03:35 p.m.
---------------------
Cuando menos sabes,
más crees...
---------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Gabriel Hermes Colina Zambra | 2007-06-02 21:01:29 | Rv: Re: Busqueda de duplicados, con demora. |
Previous Message | Ever Daniel Barreto Rojas | 2007-06-02 19:28:19 | Re[4]: velocidad en consulta con like |