3 ms·
I've recently used them to replace a many to many relation from table A to table B where the primary query was "give me all As associated with B", so the new ta
by EdwardDiego 6y ago
I've recently used them to replace a many to many relation from table A to table B where the primary query was "give me all As associated with B", so the new table had a schema of unique B, Array<A>, so what was a 20ish second query over several hundred million rows became a 0.3 second query over 600K rows.
We did have a use case that wanted to find Bs for a given A, and using a GIN index on the array column along with the PG array contains operator served that up remarkably fast also.