pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sidar López Cruz <sidarlopez@hotmail.com>
To: pgsql-performance@postgresql.org
Cc: tallen@blackducksoftware.com
Subject: Re: Very slow queries
Date: Tue, 30 Jan 2007 15:19:41 -0600
Message-ID: <BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl> (raw)
In-Reply-To: <45BFB53E.1040105@blackducksoftware.com>




>From: Ted Allen <tallen@blackducksoftware.com>
>To: Sidar López Cruz <sidarlopez@hotmail.com>
>CC: pgsql-performance@postgresql.org
>Subject: Re: [PERFORM] Very slow queries
>Date: Tue, 30 Jan 2007 16:14:38 -0500
>


>What indexes do those tables have?  Any?

Yes:
TABLE ceroriesgo.patronos ADD CONSTRAINT patronos_pkey PRIMARY 
KEY(numero_patrono);

INDEX salarios_numero_patrono_idx  ON ceroriesgo.salarios
  USING btree (numero_patrono);



>
>Sidar López Cruz wrote:
>>Check this:
>>
>>query: Delete From ceroriesgo.salarios Where numero_patrono Not In (Select 
>>numero_patrono From ceroriesgo.patronos)
>>
>>Seq Scan on salarios  (cost=51021.78..298803854359.95 rows=14240077 
>>width=6)
>>  Filter: (NOT (subplan))
>>  SubPlan
>>    ->  Materialize  (cost=51021.78..69422.58 rows=1032980 width=25)
>>          ->  Seq Scan on patronos  (cost=0.00..41917.80 rows=1032980 
>>width=25)
>>
>>
>>These query took a day to finish, how or who can improove better 
>>performance of my PostgreSQL.
>>
>>_________________________________________________________________
>>Charla con tus amigos en línea mediante MSN Messenger: 
>>http://messenger.latam.msn.com/
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 4: Have you searched our list archives?
>>
>>               http://archives.postgresql.org
>>
>
>
>--
>
>*Edward Allen*
>Software Engineer
>Black Duck Software, Inc.
>
>tallen@blackducksoftware.com <mailto:tallen@blackducksoftware.com>
>T +1.781.891.5100 x133
>F +1.781.891.5145
>http://www.blackducksoftware.com
>

_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.latam.msn.com/




view thread (9+ messages)  latest in thread

Message-ID: <BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl>
Permalink:  ../BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl/
Also on:    postgresql.org/message-id/BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: sidarlopez@hotmail.com, tallen@blackducksoftware.com
  Subject: Re: Very slow queries
  In-Reply-To: <BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl>
  References: <45BFB53E.1040105@blackducksoftware.com> <BAY132-F115B53C5DBE5274BF8B1BECEA60@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox