Query performance question on a large table

Поиск
Список
Период
Сортировка
От Együd Csaba
Тема Query performance question on a large table
Дата
Msg-id 000701c3d48d$26adfdc0$230a0a0a@compaq
обсуждение исходный текст
Ответы Re: Query performance question on a large table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Roderick A. Anderson"
Дата:
Сообщение: DBs and Schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query performance question on a large table