Skip to main content
100%

Gist 11250891

✓ Published0🌍 Public
Aandybak
Last edited Apr 24, 2014
Created on Apr 24, 2014

This example shows a PostgreSQL query plan for a Django ORM query that retrieves inventory events by filtering on stock items associated with a specific item model. The visualization renders the EXPLAIN output as a tree of hash joins and sequential scans, using the `explain` command to expose query execution details. The code includes Python Django model definitions and raw SQL, with the query plan revealing how the database optimizes multiple LEFT OUTER JOINs and subqueries against inventory, booking, purchase, and cross-hire tables.

AI-generated description

Similar vizzes