ST_Expand enlarges a geometry’s bounding box by a specified distance. In spatial searches, it supplies a fast candidate filter through the && bounding-box operator, while ST_DWithin performs the accurate distance check. section 10.6.2
Finding nearby shops
A query finds shops within 500 meters of the Brickell City Centre station. The GiST index uses && with st_expand(way, '500') to narrow candidates; ST_DWithin then verifies actual distance before sorting the nearest ten results. section 10.6.2
