slow query

Поиск
Список
Период
Сортировка
От Ludwig Lim
Тема slow query
Дата
Msg-id 20020409091828.46632.qmail@web20406.mail.yahoo.com
обсуждение исходный текст
Ответы Re: slow query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi,

Just switched an application from Oracle to PostgreSQL
recently.  I am experiencing a strange problem:
whenever I execute a relatively heavy query
in PostgreSQL, it just hangs.  To isolate the problem,
I've tried executing the query directly from psql
instead of using the application itself and
have gotten the same results.  I've even tried
vacuuming all the tables.

Anyway, viewing the process list reveals a postmaster
process that takes up 99.9% of the CPU time and just
executes forever.  Each time I execute a relatively
heavy query, a new postmaster process get stuck.  The
queries aren't really complex, i.e. a sum on a 3 table
join (about 200,000 rows  for the biggest table) [The
tables are indexed].  Like I said, Oracle takes at
most, 40 seconds to process the same query with the
same data on the same machine (dual  PIII with 1GB
RAM).  Something must be wrong...

OS:      RH 6.2
DB:      PG 7.2
APP:     CGI (using pqlib)
KERNEL:  2.4.18 (just in case it makes a diff)



  The query seemed to worked faster when one of the
index is removed. Is there a side effect when a table
has more 2 indices?


thanks,
ludwig.



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: installation problem
Следующее
От: Ludwig Lim
Дата:
Сообщение: Running stored procedure