Re: 7.3.1 New install, large queries are slow

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: 7.3.1 New install, large queries are slow
Дата
Msg-id 20030116103622.K6828-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: 7.3.1 New install, large queries are slow  ("Roman Fail" <rfail@posportal.com>)
Список pgsql-performance
On Wed, 15 Jan 2003, Roman Fail wrote:

I just had new thoughts.

If you make an index on batchdetail(batchid)
does that help?

I realized that it was doing a merge join
to join d and the (t,b,m) combination when it
was expecting 3 rows out of the latter, and
batchid is presumably fairly selective on
the batchdetail table, right? I'd have expected
a nested loop over the id column, but it
doesn't appear you have an index on it in
batchdetail.

Then I realized that batchheader.batchid and
batchdetail.batchid don't even have the same
type, and that's probably something else you'd
need to fix.

> batchheader has 2.6 million records:
> CREATE TABLE public.batchheader (
>   batchid int8 DEFAULT nextval('"batchheader_batchid_key"'::text) NOT NULL,

> And here's batchdetail too, just for kicks.  23 million records.
> CREATE TABLE public.batchdetail (
>   batchid int4,





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.3.1 New install, large queries are slow
Следующее
От: "Roman Fail"
Дата:
Сообщение: Re: 7.3.1 New install, large queries are slow