Re: possible bug

Поиск
Список
Период
Сортировка
От Les
Тема Re: possible bug
Дата
Msg-id CAKXe9UBWAML3_G66SBR2UZ3AVH1Bg5QBtYRTR0mLfwANyfxADw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: possible bug  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general


So what happens if query the table directly?:

select * from wf.workflow  where head_table_id::float8::int8 = 25408438504;

vs

select * from wf.workflow  where head_table_id = 25408438504;


Both return lots of rows. The same number of rows.

select count(*) from wf.workflow  where head_table_id::float8::int8 = 25408438504;
count|
-----+
62260|

select count(*) from wf.workflow  where head_table_id = 25408438504;
count|
-----+
62260|

Both of them use seq scan.

QUERY PLAN                                                         |
-------------------------------------------------------------------+
Aggregate  (cost=2985.00..2985.01 rows=1 width=8)                  |
  ->  Seq Scan on workflow  (cost=0.00..2829.07 rows=62369 width=0)|
        Filter: (head_table_id = '25408438504'::bigint)            |

QUERY PLAN                                                                           |
-------------------------------------------------------------------------------------+
Aggregate  (cost=3289.86..3289.87 rows=1 width=8)                                    |
  ->  Seq Scan on workflow  (cost=0.00..3288.70 rows=460 width=0)                    |
        Filter: (((head_table_id)::double precision)::bigint = '25408438504'::bigint)|
 

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

Предыдущее
От: Julie Nishimura
Дата:
Сообщение: constantly updated table in Amazon RDS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: possible bug