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

From: hmidi slim <hmidi(dot)slim2(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-docs(at)postgresql(dot)org
Subject: Why the planner does not use index for a large amount of data?
Date: 2017-12-06 14:37:21
Message-ID: CAMsqVxtGL4cO7iWTcfypxpeEAKQ3gzvqutCstqhJZJts4pKUmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

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?

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message tibor.foris 2017-12-06 14:40:01 njobs
Previous Message Michael Paquier 2017-12-06 04:31:12 Re: Replication parameters in recovery.conf

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2017-12-06 14:47:00 Re: Why the planner does not use index for a large amount of data?
Previous Message Karsten Hilbert 2017-12-06 13:24:43 Re: a back up question