# Prefix GiST index now in 8.1

DevFeed: [Prefix GiST index now in 8.1](<https://devfeed.tech/articles/prefix-gist-index-now-in-8-1-34338.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2009/02/prefix-gist-index-now-in-8.1/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2009-02-09T23:00:00Z

Content type: release

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [networking](<https://devfeed.tech/topics/networking.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>)

Tags: [extension](<https://devfeed.tech/tags/extension.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [routing](<https://devfeed.tech/tags/routing.md>)

## AI overview

The prefix extension adds support for prefix matching through PostgreSQL GiST indexes. Version 8.1 includes support code for a module version shipped by some distributions, including Red Hat Enterprise Linux 5.2. A user reported query times of 3-4 milliseconds over more than 200,000 rows, including complex fallback and carrier-priority queries.

## Source excerpt

The prefix project is about matching a literal against prefixes in your table, the typical example being a telecom routing table. Thanks to the excellent work around generic indexes in PostgreSQL with GiST, indexing prefix matches is easy to support in an external module. Which is what the prefix extension is all about. Maybe you didn't come across this project before, so here's the typical query you want to run to benefit from the special indexing, where the @> operator is read contains or is a prefix of: