# Advanced Tag Indexing in PostgreSQL with intarray

DevFeed: [Advanced Tag Indexing in PostgreSQL with intarray](<https://devfeed.tech/articles/denormalizing-tags-34523.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2013/10/denormalizing-tags/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2013-10-24T11:40:00Z

Content type: tutorial

Language: en

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

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

## AI overview

A tutorial on indexing complex tag combinations for Last.fm tracks in PostgreSQL. It migrates a SQLite dataset with pgloader and uses PostgreSQL arrays and the intarray extension to represent each track's tag IDs for querying.

## Source excerpt

In our Tour of Extensions today's article is about advanced tag indexing. We have a great data collection to play with and our goal today is to be able to quickly find data matching a complex set of tags. So, let's find out those lastfm tracks that are tagged as blues and rhythm and blues, for instance. We're going to use the Last.fm dataset from the Million Song Dataset project here. The article where they present their similarity searches is providing the whole dataset they have as a SQLite database and they propose to read their python script demo_tags_db.py to make sense of it.