System InternalsLearn ↗Quadtree (geospatial index)INSERTQUERY

Quadtree (geospatial index) — pick a scenario

0/3 done

Pick one and press Start, then click Next › to step through it.

Watch for

Dense areas subdividing into smaller cells while empty areas stay coarse — then the query skipping whole branches that fall outside its radius.

More about this scenario
You'll learn

How a quadtree adapts to where the data is, and how that structure makes spatial queries fast by pruning.

How it runs

Each INSERT descends to the leaf cell containing the point; when a cell exceeds its capacity it subdivides into four quadrants and redistributes. A QUERY walks the tree but skips any cell whose box can't intersect the search circle.