Re: problemas en postgresql -- ayuda !!!!!!

From: tania gutierrez <tanitamile(at)yahoo(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: problemas en postgresql -- ayuda !!!!!!
Date: 2005-07-28 23:43:45
Message-ID: 20050728234345.30677.qmail@web52913.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> escribió:
On Thu, Jul 28, 2005 at 05:44:48PM -0500, tania gutierrez wrote:

> cuando por el aplicativo ingresan los usuarios estos hacenuna consulta
> de autentificacion que dura 3 segundos, debido a la cantidad de
> usuairos (15000),

Veamos la consulta y el EXPLAIN ANALYZE.

--
Alvaro Herrera ()
FOO MANE PADME HUM

---------------------------(fin del mensaje)---------------------------
TIP 6: ¿Has buscado en los archivos de nuestra lista de correo?

http://archives.postgresql.org/pgsql-es-ayuda

la consutla es esta:

EXPLAIN analyze SELECT a.* from prueba.apli a, prueba.usuariop b , prueba.usuariopa c where b.USPO_ID=c.USPO_ID and c.APLI_ID=a.APLI_ID and b.USUA_ID=3939 and b.PORL_ID=1 and c.USPA_ESTADO='V' order by c.USPA_ORDEN;
-------------------------------------------------------------------------------------------------------------------------------------------------------
Sort (cost=1360.78..1360.78 rows=1 width=495) (actual time=750.070..750.072 rows=1 loops=1)
Sort Key: c.uspa_orden
-> Nested Loop (cost=1338.66..1360.77 rows=1 width=495) (actual time=121.309..749.863 rows=1 loops=1)
Join Filter: ("outer".apli_id = "inner".apli_id)
-> Nested Loop (cost=1338.66..1358.96 rows=1 width=33) (actual time=120.890..749.427 rows=1 loops=1)
Join Filter: ("outer".uspo_id = "inner".uspo_id)
-> Index Scan using uspo_uk on usuariop b (cost=0.00..8.37 rows=2 width=23) (actual time=0.106..0.119 rows=1 loops=1)
Index Cond: ((usua_id = 3939::numeric) AND (porl_id = 1::numeric))
-> Materialize (cost=1338.66..1341.31 rows=265 width=56) (actual time=0.051..621.947 rows=52851 loops=1)
-> Seq Scan on usuariopa c (cost=0.00..1338.66 rows=265 width=56) (actual time=0.040..423.953 rows=52851 loops=1)
Filter: (uspa_estado = 'V'::text)
-> Seq Scan on aplicacion a (cost=0.00..1.36 rows=36 width=485) (actual time=0.024..0.290 rows=36 loops=1)
Total runtime: 752.680 ms
(13 filas)

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2005-07-28 23:45:26 Re: Ayuda con variables de funciones
Previous Message tania gutierrez 2005-07-28 23:07:51 problemas en postgresql -- ayuda !!!!!!