Re: Query runs very slowly in Postgres, but very fast in other DBMS

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query runs very slowly in Postgres, but very fast in other DBMS
Дата
Msg-id 7310.1113284590@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query runs very slowly in Postgres, but very fast in other DBMS  ("Andrus Moor" <eetasoft@online.ee>)
Список pgsql-sql
"Andrus Moor" <eetasoft@online.ee> writes:
> Seq Scan on rid  (cost=0.00..28698461.07 rows=32201 width=14)
>   Filter: (NOT (subplan))
>   SubPlan
>     ->  Seq Scan on dok  (cost=0.00..864.29 rows=10729 width=14)

> Is it possible to speed up this query is Postgres ?

Can you switch to int4 or int8 instead of NUMERIC(12)?  I think that
we don't currently consider NUMERIC hashable, and you really need a
hash subplan here.  In general NUMERIC is a bad choice if you're hot
about performance, anyway.  Integers or floats would be probably two
orders of magnitude faster.
        regards, tom lane


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

Предыдущее
От: "Bill Lawrence"
Дата:
Сообщение: Re: Getting the output of a function used in a where clause
Следующее
От: Krasimir Dimitrov
Дата:
Сообщение: Re: Query runs very slowly in Postgres, but very fast in other DBMS