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

Re: Consulta, a priori, sencilla

From: "Silvio Quadri" <silvioq(at)gmail(dot)com>
To: pgsql-es-ayuda-postgresql(dot)org(at)postgresql(dot)org
Subject: Re: Consulta, a priori, sencilla
Date: 2008-12-30 11:10:30
Message-ID: 61dc71dc0812300310t23d5c1fal6b90e7dcb20e991b@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
El día 29 de diciembre de 2008 14:57, "I.N.T. - Programación"
<dpto(dot)programacion(at)grupo-int(dot)com> escribió:
> enviosdfa=# EXPLAIN ANALYZE SELECT * FROM envios WHERE apellidos LIKE
> 'BODEGAS MURUA%' ORDER BY apellidos;
>                                                      QUERY
> PLAN
> ---------------------------------------------------------------------------------------------------------------------
>  Sort  (cost=144384.87..144384.88 rows=1 width=650) (actual
> time=34724.021..34724.040 rows=36 loops=1)
>    Sort Key: apellidos
>    ->  Seq Scan on envios  (cost=0.00..144384.86 rows=1 width=650) (actual
> time=1691.879..34723.437 rows=36 loops=1)
>          Filter: (apellidos ~~ 'BODEGAS MURUA%'::text)
>  Total runtime: 34724.121 ms
> (5 filas)

Usá :

select * from envios where apellidos between 'BODEGAS MURUA' and
'BODEGAS MURUAzzzzzz'

Toma mejor los índices.

Silvio



-- 
Silvio Quadri

In response to

pgsql-es-ayuda by date

Next:From: Raúl Andrés Duque MurilloDate: 2008-12-30 11:21:50
Subject: Re: [Fwd: Re: Consulta, a priori, sencilla]
Previous:From: I.N.T. - ProgramaciónDate: 2008-12-30 11:03:27
Subject: [Fwd: Re: Consulta, a priori, sencilla]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group