Re: Need help with optimising simple query

2018-07-09 Thread Nandakumar M
Hi Tom, Is there something that I can do to improve the performance of such queries (where ordering is done based on child table column and join is left join)? Maybe a combined index or something like that? Or is it possible to modify the query to get same result but execute faster. One ad-hoc opt

Re: Need help with optimising simple query

2018-07-09 Thread Tom Lane
Nandakumar M writes: > I am having a query that has an order by and a limit clause. The > column on which I am doing order by is indexed (default b tree index). > However the index is not being used. On tweaking the query a bit I > found that when I use left join index is not used whereas when I u

Need help with optimising simple query

2018-07-09 Thread Nandakumar M
Hi, I am having a query that has an order by and a limit clause. The column on which I am doing order by is indexed (default b tree index). However the index is not being used. On tweaking the query a bit I found that when I use left join index is not used whereas when I use inner join the index i