Which operator is faster: like vs =
Explain Explaining the query will help you to estimate how expensive your query is and which query plan will be used. 1 2 3 4 5 6 khanh=# explain select g from grades where g = 100; QUERY PLAN ------------------------------------------------------------------------------- Index Only Scan using g_index on grades (cost=0.42..97.55 rows=4636 width=4) Index Cond: (g = 100) (2 rows) So, this query will use Index-Only-Scan. The cost of the query is ranging from 0.42 to 97.55, 4636 is number of estimated return rows, width is size of return data in byte. ...