From: | "Cristian Saavedra" <cristian(dot)aquii(at)gmail(dot)com> |
---|---|
To: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | problema con el sort. |
Date: | 2007-04-24 21:17:51 |
Message-ID: | 4bd8ca30704241417k25b225cdw7e19d067d873bc1c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Hola lista
He estado teniendo el siguiente problema, resulta que estoy haciendo un
select de una tabla de la siguiente forma.
select suc_name_s from sucursales_136 where lower(suc_name_s) like 'dalen%'
order by suc_name_s
suc_name_s
-----------------------------------------------
Dalen
Dalen
Dalen Adventure as
Dalen as
Dalen Barnehage
Dalen Barnehage
Dalen bed & Breakfast V/delphine Desme
Dalen Betong as
Dalen Bildebehandling
Dalen Bilsenter as
Dalen Bjarne
Dalen Bjørn Vidar
Dalen Borettslag
Dalen Borettslag
Dalen Consult
Dalen Dalsveien
Dalen Diagnostics as
Dalene <------------------------- fijense
en este registro
Dalene Halvor e
Dalen Eiendom as
Dalen Eiendom as
Dalen Eiendom Molde as
Dalen Eiendomsutvikling as
Dalen Eigedomsutvikling as
Dalene Ronny <------------------------- y en este
Dalen Fisk og Fiskemat as
el explain de esta consulta es
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=6.03..6.03 rows=1 width=23) (actual time=2.387..2.778 rows=114
loops=1)
Sort Key: suc_name_s
-> Index Scan using suc_136_name_lower_index on sucursales_136 (cost=
0.01..6.02 rows=1 width=23) (actual time=0.058..1.340 rows=114 loops=1)
Index Cond: ((lower((suc_name_s)::text) ~>=~ 'dalen'::character
varying) AND (lower((suc_name_s)::text) ~<~ 'daleo'::character varying))
Filter: (lower((suc_name_s)::text) ~~ 'dalen%'::text)
Total runtime: 3.248 ms
(6 rows)
la columna suc_name_s tiene los siguientes indices.
"suc_136_name_index" btree (suc_name_s varchar_pattern_ops)
"suc_136_name_lower_index" btree (lower(suc_name_s::text)
varchar_pattern_ops)
"suc_name_regular_index_136" btree (suc_name_s)
La base de datos esta codificada en utf8, todos los locales estan en
es_ES(dot)utf8(at)euro, la version que estoy usando es la 8.1.3
No he podido saber porque no ordena bien la consulta. Alguna sugerencia?
Gracias.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-04-24 21:23:38 | Re: problema con el sort. |
Previous Message | Guido Barosio | 2007-04-24 18:38:19 | Re: VACUUMDB |