Query performance question on a large table - Mailing list pgsql-general

From Együd Csaba
Subject Query performance question on a large table
Date
Msg-id 000701c3d48d$26adfdc0$230a0a0a@compaq
Whole thread Raw
Responses Re: Query performance question on a large table
List pgsql-general
Hi All,
how can I improve the query performance in the following situation:
I have a big (4.5+ million rows) table. One query takes approx. 9 sec to
finish resulting ~10000 rows. But if I run simultaneously 4 similar queries
it takes nearly 5 minutes instead of 4 times 9 seconds or something near of
that.

here is a sample query:
select  mertido, fomeazon, ertektipus, mertertek from t_me30 where fomeazon
in (select distinct fomeazon from t_fome where lower(inuse) = 'igen') and
mertido like '2003-12-17%' and ertektipus in ('+MW') order by mertido,
fomeazon, ertektipus;

What kind of indexes could speed up a query like this? I tried to create one
on fields (mertido, fomeazon, ertektipus) but led me much longer execution
time.

Ohh, I nearly forgot the config:  Linux 7.1; Postgres 7.3.2;

Thank you,
bye

----------------------------------------
Csaba Együd
csegyud@vnet.hu


pgsql-general by date:

Previous
From: "Roderick A. Anderson"
Date:
Subject: DBs and Schemas
Next
From: Tom Lane
Date:
Subject: Re: Query performance question on a large table