# How and when to use btree\_gist

DevFeed: [How and when to use btree\_gist](<https://devfeed.tech/articles/how-and-when-to-use-btree-gist-5062.md>)

Original publisher: [Read original article](<https://neon.com/blog/btree_gist>)

Author: George MacKerron

Published: 2024-07-08T13:29:31Z

Content type: tutorial

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [CSV](<https://devfeed.tech/topics/csv.md>), [data](<https://devfeed.tech/topics/data.md>), [DateTime](<https://devfeed.tech/topics/datetime.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [extension](<https://devfeed.tech/tags/extension.md>), [files](<https://devfeed.tech/tags/files.md>), [format](<https://devfeed.tech/tags/format.md>), [index](<https://devfeed.tech/tags/index.md>), [monitor](<https://devfeed.tech/tags/monitor.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [schema](<https://devfeed.tech/tags/schema.md>), [sql](<https://devfeed.tech/tags/sql.md>), [time](<https://devfeed.tech/tags/time.md>)

## AI overview

This tutorial explains how to use PostgreSQL indexes for queries combining one-dimensional and multidimensional data. It focuses on the btree_gist extension and demonstrates its use with UK crime data containing locations and reporting dates, including loading selected CSV data into PostgreSQL.

## Source excerpt

The right indexes make big SQL queries fast. If you've been using Postgres for more than 5 minutes, you're almost certainly familiar with the everyday B-Tree index. This can deal with data that has a one-dimensional ordering: numbers, timestamps, text, and so on. And if you've ha...