Re: [GENERAL] Avoid using index scan backward when limit order desc

2016-12-19 Thread Tom Lane
Christophe Escobar writes: > I have some performance issues when trying to fetch rows from the table > with a specific query, I suspect the planner to choose the wrong index > because of the limit. > ... > 1) Why is the planner changing index scanning at the threshold of 45 for > the LIMIT ? That

Re: [GENERAL] Avoid using index scan backward when limit order desc

2016-12-19 Thread Melvin Davidson
On Mon, Dec 19, 2016 at 12:05 PM, Christophe Escobar < christophe.e...@gmail.com> wrote: > Hi, > > I am using PostgreSQL 9.4.8 on x86_64-unknown-linux-gnu, compiled by gcc > (Debian 4.9.2-10) 4.9.2, 64-bit. > > I have a notification table with about ~45 000 000 rows. > > I have some performance is