pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Fabio C. Bon <bon@kernel.net.uy>
Cc: pgsql-performance@postgresql.org
Subject: Re: [ADMIN] A query with performance problems.
Date: Tue, 6 May 2003 07:39:57 -0700 (PDT)
Message-ID: <20030506073613.K7678-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <003301c313c9$fe7a2d80$0501a8c0@kdomain>


[Moving to -performance since it's more ontopic there]

On Tue, 6 May 2003, Fabio C. Bon wrote:

> I have a database on PostgreSQL 7.2.1 and I have performance's problems with
> some queries.
> I'm debbuging the query below:
>
> Select count(*) from blcar
> where manide = 3811 and blide = 58090 and bcalupcod = 'MVDUY' and bcalopcod
> = 'LOCAL' and bcapag <> 'P';

What does the schema of the table look like?

Is the SQL query in the file exactly the same text as the above?

>  Aggregate  (cost=8277.10..8277.10 rows=1 width=0) (actual
> time=1273.98..1273.98 rows=1 loops=1)
>    ->  Seq Scan on blcar  (cost=0.00..8277.09 rows=1 width=0) (actual
> time=1273.96..1273.96 rows=0 loops=1)
>          Filter: (((manide)::numeric = 3811::numeric) AND ((blide)::numeric

It seems to want to coerce manide and blide to a numeric here, which seems
odd.

> = 58090::numeric) AND (bcalupcod = 'MVDUY'::bpchar) AND (bcalopcod =
> 'REPRE'::bpchar) AND (bcapag <> 'P'::bpchar))
>  Total runtime: 1274.08 msec
> (4 rows)




view thread (2+ messages)

Message-ID: <20030506073613.K7678-100000@megazone23.bigpanda.com>
Permalink:  ../20030506073613.K7678-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030506073613.K7678-100000@megazone23.bigpanda.com

 · 

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-admin@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, bon@kernel.net.uy, pgsql-performance@postgresql.org
  Subject: Re: [ADMIN] A query with performance problems.
  In-Reply-To: <20030506073613.K7678-100000@megazone23.bigpanda.com>
  References: <003301c313c9$fe7a2d80$0501a8c0@kdomain> <20030506073613.K7678-100000@megazone23.bigpanda.com>

* 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