Re: Optimize query - Mailing list pgsql-general

From Raul Giucich
Subject Re: Optimize query
Date
Msg-id CAN0zQZ59wMfX=HZoYa4HZ3J-x50NjxKwzza=kF59Hfu3wq0VMA@mail.gmail.com
Whole thread Raw
In response to Optimize query  (Yambu <hyambu@gmail.com>)
List pgsql-general
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 the columns that are significant to answer the question you user is making executing this query.
Sorry for my foreign english.
Best regards.
Raúl.


El mar, 15 dic 2020 a las 11:18, Yambu (<hyambu@gmail.com>) escribió:
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

pgsql-general by date:

Previous
From: Yambu
Date:
Subject: Optimize query
Next
From: Ron
Date:
Subject: Re: Optimize query