r/programming • • Sep 24 '20

PostgreSQL 13 Released!

https://www.postgresql.org/about/news/2077/
1.3k Upvotes

236 comments sorted by

View all comments

289

u/little_blue_teapot Sep 24 '20

The major highlights:

PostgreSQL 13 contains many new features and enhancements, including:

  • Space savings and performance gains from de-duplication of B-tree index entries

  • Improved performance for queries that use aggregates or partitioned tables

  • Better query planning when using extended statistics

  • Parallelized vacuuming of indexes

  • Incremental sorting

51

u/I_AM_GODDAMN_BATMAN Sep 24 '20

I'm curious about reverse b-tree index to support LIKE '%something' query. Maybe it's better to use GIN.

15

u/krum Sep 24 '20

GIN?

29

u/TheMightyMegazord Sep 24 '20

11

u/krum Sep 24 '20 edited Sep 24 '20

So I took a look at this, and I'm not sure how GIN would help with string wildcard prefix matches. It did just occur to me that you could have a b-tree comparator that sorted strings backwards to achieve that but of course that would incur two b-tree writes per value.

7

u/mrweck Sep 24 '20

You can look at the pg_trgm extension, on contrib. With it, you can do wildcard searches like '%test%'

1

u/LordSeptum Oct 02 '20

DUDE I'm going to have to try this. We work with millions of records and while we implement full-text indexing for human-readable fields, for something such as partial part number searches, this would be great.