Re: [ADMIN] A query with performance problems. - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: [ADMIN] A query with performance problems.
Date
Msg-id 20030506073613.K7678-100000@megazone23.bigpanda.com
Whole thread Raw
List pgsql-performance
[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)


pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [HACKERS] Hypothetical suggestions for planner, indexing
Next
From: "scott.marlowe"
Date:
Subject: Re: Looking for a cheap upgrade (RAID)