Timeline for Do covering indexes in PostgreSQL help JOIN columns?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 25, 2022 at 22:07 | history | edited | Erwin Brandstetter | CC BY-SA 4.0 |
better link
|
Oct 29, 2021 at 0:19 | history | edited | Erwin Brandstetter | CC BY-SA 4.0 |
add table aliases
|
Jul 23, 2020 at 7:25 | comment | added | pensnarik |
When joining tables only Nested Loop join strategy can use indices to make JOIN faster. Both Hash Join and Merge Join cannot use indexes - the most efficient way to speed up JOIN in these cases is to decrease hash table size by adding additional WHERE clauses and selecting few columns (in first case) and pre-sort data in the second case.
|
|
Jun 19, 2020 at 1:00 | comment | added | Erwin Brandstetter |
@JSON4Live: Not entirely sure what you are asking. Both queries are 100 % equivalent. Postgres will generate the same query plan, and the index on table2(t2c1, t1) can be used either way. I clarified a bit and added more links.
|
|
Jun 19, 2020 at 0:59 | history | edited | Erwin Brandstetter | CC BY-SA 4.0 |
clarify, add links, updae links
|
Jun 17, 2020 at 5:46 | comment | added | JSON4Live | may i ask a question please? if the "equivalent query(CROSS JOIN)" is used does that means the composite index created will be waste(CREATE INDEX ON table2 (t2c1, t1))? because in that WHERE clause is(t1, t2c1) hence both queries are not equivalent? | |
Jun 7, 2018 at 13:00 | history | edited | Erwin Brandstetter | CC BY-SA 4.0 |
add covering indexes in pg 11
|
Nov 5, 2017 at 16:46 | vote | accept | ldrg | ||
Nov 5, 2017 at 14:30 | history | edited | Erwin Brandstetter | CC BY-SA 3.0 |
added 81 characters in body
|
Nov 5, 2017 at 14:24 | history | answered | Erwin Brandstetter | CC BY-SA 3.0 |