Re: Why the planner does not use index for a large amount of data?

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: Why the planner does not use index for a large amount of data?
Дата
Msg-id CANu8Fixr-A=zt-3aqvaFSGchdd+cU6L0jwyz7cCnTmXQ34MpPA@mail.gmail.com
обсуждение исходный текст
Ответ на Why the planner does not use index for a large amount of data?  (hmidi slim <hmidi.slim2@gmail.com>)
Список pgsql-general


On Wed, Dec 6, 2017 at 9:37 AM, hmidi slim <hmidi.slim2@gmail.com> wrote:
Hi,
When I used explain I found that the query planner use a seq scan to execute a query on a table containing about 2 millions rows.However I'm creating an index.Why does the planner uses seq scan in place of index scan?Does the execution of index scan is slower with table containing a huge amount of data?

>Why does the planner uses seq scan in place of index scan?

It is strongly suggested that you provide the PostgreSQL version and O/S when posing questions to this mail list.
In addition, your question cannot be answered unless you also provide
A. The explain plan in question.
B. The structure of all indexes involved
C, Have you run ANALYZE on all tables involved?



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

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

Предыдущее
От: hmidi slim
Дата:
Сообщение: Why the planner does not use index for a large amount of data?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Why the planner does not use index for a large amount of data?