PostgreSQL does CAST implicitely between int and a domain derived from int

Поиск
Список
Период
Сортировка
От Jean-Michel Pouré
Тема PostgreSQL does CAST implicitely between int and a domain derived from int
Дата
Msg-id 1251297631.9378.39.camel@acer
обсуждение исходный текст
Ответы Re: PostgreSQL does CAST implicitely between int and a domain derivedfrom int  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-performance
Dear friends,

I contact on Postgresql hackers request.

I am running into a systemic
problem using Drupal under PostgreSQL 8.4

Drupal relies heavily on a domain derived from int:

CREATE DOMAIN int_unsigned
  AS integer
   CONSTRAINT int_unsigned_check CHECK ((VALUE >= 0));

Analysing slow queries, I noticed that PostgreSQL 8.4 would cast data
from int4 to int_unsigned. Some queries range between 400ms and 700ms.

This provides some large sequential scans.
Could you help understand why a cast happens?

Details, query plan and database:
http://drupal.org/node/559986

Postgresql.conf has no special settings for optimizing queries other
than PostgreSQL 8.4 syntax. Only shared memory is much larger.

Kind regards,
Jean-Michel

Вложения

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

Предыдущее
От: Matthew Wakeling
Дата:
Сообщение: Re: Fwd: How to create a multi-column index with 2 dates using 'gist'?
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: PostgreSQL does CAST implicitely between int and a domain derivedfrom int