Re: SELECT performance drop

Поиск
Список
Период
Сортировка
От Jan Nielsen
Тема Re: SELECT performance drop
Дата
Msg-id CANxH4hEvgeitLDCcW_ZHpoGRgnBN69=9A-rnzxWVOvRYzsoU0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SELECT performance drop  (Jan Nielsen <jan.sture.nielsen@gmail.com>)
Список pgsql-performance
With Pascal's suggestion, I added a new index:

    CREATE INDEX fm_order_sid_type_idx ON fm_order (session_id, type);

which improved the query to 2mS!


Thank you, Pascal!

On Thu, Jan 24, 2019 at 9:52 AM Jan Nielsen <jan.sture.nielsen@gmail.com> wrote:


On Wed, Jan 23, 2019 at 12:37 PM legrand legrand <legrand_legrand@hotmail.com> wrote:
Hi,
is there an index on
 fm_order(session_id,type)?

There isn't at the moment:

   table_name   |          index_name          | column_name  
----------------+------------------------------+-------------
fm_account     | fm_account_pkey              | id
fm_account     | uk_5p6qalvucbxmw9u64wf0aif9d | name
fm_allocation  | fm_allocation_pkey           | id
fm_approval    | fm_approval_pkey             | id
fm_capital     | fm_capital_pkey              | id
fm_grant       | fm_grant_pkey                | id
fm_market      | fm_market_pkey               | id
fm_marketplace | fm_marketplace_pkey          | id
fm_order       | fm_order_pkey                | id
fm_person      | fm_person_pkey               | id
fm_session     | fm_session_pkey              | id
fm_trader      | fm_trader_pkey               | id


 

regar
ds
PAscal

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

Предыдущее
От: Jan Nielsen
Дата:
Сообщение: Re: SELECT performance drop
Следующее
От: "ldh@laurent-hasson.com"
Дата:
Сообщение: Zero throughput on a query on a very large table.