From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rhaoni Chiu Pereira <rhaoni@sistemica.info>
Cc: PostgreSQL ADMIN <pgsql-admin@postgresql.org>
Subject: Re: How can I make PosgreSQL use an Index ?
Date: Wed, 17 Sep 2003 17:20:46 -0400
Message-ID: <5977.1063833646@sss.pgh.pa.us> (raw)
In-Reply-To: <1063831482.3f68c7bab4b1a@sistemica.info>
References: <1063831482.3f68c7bab4b1a@sistemica.info>
Rhaoni Chiu Pereira <rhaoni@sistemica.info> writes:
> When I run a explain analyze with this where clause:
> ... gsames00.ano_mes = to_char(ftnfco00.data_emissao,'YYYYMM') AND ...
> ...
> -> Seq Scan on gsames00 (cost=100000000.00..100000006.72 rows=372 width=10)
> (actual time=0.01..0.96 rows=372 loops=19923)
> ...
If you're not going to show us the whole query and the whole EXPLAIN
output, you're going to get equally incomplete answers. I will say
though that forcing an index instead of a seqscan on a 372-row table
isn't likely to be a magic bullet. You probably need a better join
plan.
Please post fuller details on pgsql-performance. You might save some
time by reading the posting tips first ...
http://techdocs.postgresql.org/guides/SlowQueryPostingGuidelines
regards, tom lane
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: tgl@sss.pgh.pa.us, rhaoni@sistemica.info
Subject: Re: How can I make PosgreSQL use an Index ?
In-Reply-To: <5977.1063833646@sss.pgh.pa.us>
References: <1063831482.3f68c7bab4b1a@sistemica.info> <5977.1063833646@sss.pgh.pa.us>
* 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