Re: int8 primary keys still not using index without manual JDBC driver patch (7.4RC1)

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: int8 primary keys still not using index without manual JDBC driver patch (7.4RC1)
Дата
Msg-id 20031107004501.GA19893@svana.org
обсуждение исходный текст
Ответ на int8 primary keys still not using index without manual JDBC driver patch (7.4RC1)  ("Craig O'Shannessy" <craig@ucw.com.au>)
Ответы Re: int8 primary keys still not using index without manual  ("Craig O'Shannessy" <craig@ucw.com.au>)
Список pgsql-general
Any particular reason you can't just put the value in quotes and let
postgres determine the type?

On Fri, Nov 07, 2003 at 10:43:05AM +1100, Craig O'Shannessy wrote:
> Hi all,
>
> Just thought I'd mention that I really think this problem needs to be
> fixed.  I
>
> I'm patching the 7.4RC1 JDBC drivers as we speak due to this optimiser
> bug, and it's the third time I've had to do this.  I would think this bug
> causes quite a lot of people to evaluate postgres and decide it has awful
> primary key performance!  I love postgres, and hate to think that this
> could be happening.
>
> template1=# explain select * from lineitem where lineitemid=26845437;
>                           QUERY PLAN
> --------------------------------------------------------------
>  Seq Scan on lineitem  (cost=0.00..82685.91 rows=1 width=103)
>    Filter: (lineitemid = 26845437)
> (2 rows)
>
> template1=# explain select * from lineitem where lineitemid=26845437::int8;
>                                    QUERY PLAN
> --------------------------------------------------------------------------------
>  Index Scan using lineitem_pkey on lineitem  (cost=0.00..3.53 rows=1 width=103)
>    Index Cond: (lineitemid = 26845437::bigint)
> (2 rows)
>
> I've noticed this is in the TODO :
> Allow SELECT * FROM tab WHERE int2col = 4 to use int2col index, int8,
>   float4, numeric/decimal too [optimizer])
>
> Too hard to fix before 7.4 final?
>
> Regards,
>
> Craig
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

Вложения

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

Предыдущее
От: "Craig O'Shannessy"
Дата:
Сообщение: int8 primary keys still not using index without manual JDBC driver patch (7.4RC1)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimiser desicion bringing system to its knees?