Query pattern: OR across different tables

When a query uses a construct like SELECT … FROM a JOIN b ON (…) WHERE a.c1 = X OR b.c2 = Y execution will inevitably degrade as the dataset grows. The optimiser can choose to use an index merge when dealing with two relevant indexes over a single table, but that’s obviously of no […]