Re: Identical query on two machines, different plans....

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Identical query on two machines, different plans....
Дата
Msg-id 1145541587.3553.30.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Identical query on two machines, different plans....  (Mario Splivalo <mario.splivalo@mobart.hr>)
Ответы Re: Identical query on two machines, different plans....  (Mario Splivalo <mario.splivalo@mobart.hr>)
Re: Identical query on two machines, different plans....  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-performance
You very likely forgot to run ANALYZE on your laptop after copying the
data. Observe the different row count estimates in the 2 plans...

HTH,
Csaba.


> QUERY PLAN
>
---------------------------------------------------------------------------------------------------------------------------------------------------
>  Index Scan using ticketing_codes_uq_value_group_id on ticketing_codes
> (cost=0.00..6.02 rows=1 width=4) (actual time=0.104..0.107 rows=1
                                                             ^^^^^^
> loops=1)
>    Index Cond: (((code_value)::text = 'C7ZP2U'::text) AND (code_group_id
> = 1000))
>  Total runtime: 0.148 ms
> (3 rows)
>
>
> PLAN
>
----------------------------------------------------------------------------------------------------------------------------------------------
>  Bitmap Heap Scan on ticketing_codes  (cost=2.01..1102.05 rows=288
                                                            ^^^^^^^^
> width=4) (actual time=88.164..88.170 rows=1 loops=1)
>    Recheck Cond: (((code_value)::text = 'C7ZP2U'::text) AND
> (code_group_id = 1000))
>    ->  Bitmap Index Scan on ticketing_codes_uq_value_group_id
> (cost=0.00..2.01 rows=288 width=0) (actual time=54.397..54.397 rows=1
> loops=1)
>          Index Cond: (((code_value)::text = 'C7ZP2U'::text) AND
> (code_group_id = 1000))
>  Total runtime: 88.256 ms
> (5 rows)
>



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

Предыдущее
От: Mario Splivalo
Дата:
Сообщение: Identical query on two machines, different plans....
Следующее
От: Mario Splivalo
Дата:
Сообщение: Re: Identical query on two machines, different plans....