Changes between Version 4 and Version 5 of Ticket #30913


Ignore:
Timestamp:
Oct 26, 2019, 4:46:37 PM (5 years ago)
Author:
Hannes Ljungberg
Comment:

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.
     1Postgres got support for the `INCLUDE` clause in `CREATE INDEX`. This can be used to add non-key columns to the index.
    22
    33{{{
    44CREATE INDEX idx
    55    ON t1 ( col1 )
    6     INCLUDE ( col2 );
     6     INCLUDE ( col2 )
    77}}}
    88
     
    1010
    1111{{{
    12 SELECT col1, col2 FROM t1 WHERE col1 = 'foo';
     12SELECT col1, col2 FROM t1 WHERE t1 = 'foo';
    1313}}}
    1414
     
    1616https://www.postgresql.org/docs/current/sql-createindex.html
    1717https://use-the-index-luke.com/blog/2019-04/include-columns-in-btree-indexes
    18 https://www.postgresql.org/docs/10/indexes-index-only-scans.html
     18https://www.postgresql.org/docs/current/indexes-index-only-scans.html
    1919
    2020The idea is to add an additional kwarg to `Index` to support this:
     
    2525    fields=['headline'],
    2626    include=['pub_date']
    27 )
    2827}}}
    2928
Back to Top