Re: different clients, different query plans

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: different clients, different query plans
Дата
Msg-id 4D5E34B5020000250003AD10@gw.wicourts.gov
обсуждение исходный текст
Ответ на different clients, different query plans  (Uwe Bartels <uwe.bartels@gmail.com>)
Ответы Re: different clients, different query plans  (Uwe Bartels <uwe.bartels@gmail.com>)
Список pgsql-performance
Uwe Bartels <uwe.bartels@gmail.com> wrote:

> I have a java application which generates inperformant query
> plans.

> Index Cond: ((lat >= $3) AND (lat <= $4) AND (lon >= $1) AND (lon
> <= $2))

> Filter: (((lon)::double precision >= $1) AND ((lon)::double
> precision <= $2) AND ((lat)::double precision >= $3) AND
> ((lat)::double precision <= $4))

It is the cast of the table columns to double precision which is
taking the index out of play.

What are the data types of those columns?  What does the code look
like where you're setting the values for the parameters?  If nothing
else, writing the query so that the parameters are cast to the right
type before use might solve the problem, but I would start by
looking at the object classes used in the Java app.

-Kevin

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

Предыдущее
От: Uwe Bartels
Дата:
Сообщение: different clients, different query plans
Следующее
От: Uwe Bartels
Дата:
Сообщение: Re: different clients, different query plans