---
title: "Discussion on \"Using AI to Investigate a Slow Query: Why Django icontains Skipped Our pg_trgm Index\" | Hashnode"
description: "Discussion on \"Using AI to Investigate a Slow Query: Why Django icontains Skipped Our pg_trgm Index\". How we used AI to find why Django icontains skipped our pg_trgm index, tracing UPPER() LIKE queries through monitoring data, SQL and query plans."
url: "https://hashnode.com/posts/using-ai-to-investigate-a-slow-query-why-django-icontains-skipped-our-pg-trgm-index/6ac3bbaeec86a30626ceeab8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using AI to Investigate a Slow Query: Why Django icontains Skipped Our pg\_trgm Index](https://nulltensor.hashnode.dev/using-ai-to-investigate-a-slow-query-why-django-icontains-skipped-our-pg-trgm-index?utm_source=hashnode&utm_medium=feed)

How we used AI to find why Django icontains skipped our pg\_trgm index, tracing UPPER() LIKE queries through monitoring data, SQL and query plans.

Oct 5 · 7 min read · nulltensor.hashnode.dev  
Read the article

-   [#django](https://hashnode.com/tag/django)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#python](https://hashnode.com/tag/python)
-   [#ai](https://hashnode.com/tag/ai)

## Written by

[Rohan Sen Sharma](https://hashnode.com/@nulltensor)

@nulltensor · Mumbai, India

  
[View profile](https://hashnode.com/@nulltensor)

CTO building B2B SaaS with AI. Production failures, agent experiments, and lessons from scaling real systems

CTO building B2B SaaS with AI. Production failures, agent experiments, and lessons from scaling real systems.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
