Re: Optimize query

2020-12-15 Thread Ron
On 12/15/20 8:17 AM, Yambu wrote: Hi How would you optimize a query with greater than in where clause eg select * from table1 where id > 1000 and there is an index on id column The question as written is unanswerable. - Why do you think it needs to be optimized? - What is the table cardinal

Re: Optimize query

2020-12-15 Thread Raul Giucich
Hi Yambu, the btree index type is optimized for this kind of operators (>, >=, <, <=, =). For deep understanding on how to plan an query optimization I would recommend https://classroom.google.com/c/MTQ4MzczNDExMjM4 and https://use-the-index-luke.com. Another tip is use in the select clause only th

Optimize query

2020-12-15 Thread Yambu
Hi How would you optimize a query with greater than in where clause eg select * from table1 where id > 1000 and there is an index on id column regards