Hacker News new | ask | show | jobs
by ars 2322 days ago
There are only 1,681 voting precincts. And only a couple of parties.

So an index on the join is completely irrelevant.

There are also under a million voters. Even with no indexes at all this query will perform just fine.

Because of the where and the left join there's pretty much just one possible access plan.

Criticize the lack of bound parameters and other problems if you like, but the query itself is perfectly fine.