Re: Optimize query

From: Raul Giucich <raul(dot)giucich(at)gmail(dot)com>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Optimize query
Date: 2020-12-15 14:27:59
Message-ID: CAN0zQZ59wMfX=HZoYa4HZ3J-x50NjxKwzza=kF59Hfu3wq0VMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)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
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2020-12-15 15:37:21 Re: Optimize query
Previous Message Yambu 2020-12-15 14:17:52 Optimize query