Re: Re: [Pgsql-ayuda] update exists

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Xavi Puig <personal(at)xavihost(dot)com>
Cc: "pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx" <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: Re: Re: [Pgsql-ayuda] update exists
Date: 2003-10-23 13:22:46
Message-ID: 20031023132246.GC24085@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Thu, Oct 24, 2002 at 10:25:21AM +0100, Xavi Puig wrote:
> Os adjunto explain con query ejemplo:

Faltó adjuntar la consulta. Pero lo que sospecho es que tab1 no tiene
un índice apropiado en la columna que está devolviendo la subconsulta...

Dejé mi bola de cristal en la casa, de manera que tendrás que indicar
las definiciones de las tablas y la consulta que estás ejecutando.

> QUERY PLAN
> Seq Scan on tab1 (cost=0.00..22726480.50 rows=133984 width=57)
> Filter: (subplan)
> SubPlan
> -> Hash Join (cost=6.45..84.68 rows=1 width=16)
> Hash Cond: ("outer".tab2 = "inner".col2)
> -> Nested Loop (cost=0.00..78.09 rows=29 width=12)
> -> Index Scan using tab1_col1 on tab1 (cost=0.00..2.01 rows=1 width=4)
> Index Cond: (col1 = true)
> -> Index Scan using btree_tab3_col2 on tab3 (cost=0.00..75.65 rows=34 width=8)
> Index Cond: (tab3.col2 = "outer".col2)
> -> Hash (cost=6.45..6.45 rows=1 width=4)
> -> Index Scan using btree_tab2_col2 on tab2 (cost=0.00..6.45 rows=1 width=4)
> Index Cond: (col2 = 'keyword1'::character varying)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2003-10-23 13:26:28 Re: [Pgsql-ayuda] Manejo de Rollback
Previous Message Alvaro Herrera 2003-10-23 13:15:31 Re: [Pgsql-ayuda] Truncate y Delete