Changes between Version 4 and Version 5 of Ticket #30913
- Timestamp:
- Oct 26, 2019, 4:46:37 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30913 – Description
v4 v5 1 Postgres got support for the `INCLUDE` clause in `CREATE INDEX` in version 11. This can be used to add non-key columns to the index.1 Postgres got support for the `INCLUDE` clause in `CREATE INDEX`. This can be used to add non-key columns to the index. 2 2 3 3 {{{ 4 4 CREATE INDEX idx 5 5 ON t1 ( col1 ) 6 INCLUDE ( col2 );6 INCLUDE ( col2 ) 7 7 }}} 8 8 … … 10 10 11 11 {{{ 12 SELECT col1, col2 FROM t1 WHERE col1 = 'foo';12 SELECT col1, col2 FROM t1 WHERE t1 = 'foo'; 13 13 }}} 14 14 … … 16 16 https://www.postgresql.org/docs/current/sql-createindex.html 17 17 https://use-the-index-luke.com/blog/2019-04/include-columns-in-btree-indexes 18 https://www.postgresql.org/docs/ 10/indexes-index-only-scans.html18 https://www.postgresql.org/docs/current/indexes-index-only-scans.html 19 19 20 20 The idea is to add an additional kwarg to `Index` to support this: … … 25 25 fields=['headline'], 26 26 include=['pub_date'] 27 )28 27 }}} 29 28