c_db=>select count(id) from metadata where author like '%Kelly%'; count ------- 3558 (1 row)
I do not see evidence that the nested loop is trying to reduce overhead by using the smaller set. It seems to want to scan on data first either way.
I have run vacuum analyze, in the hopes that the optimizer is miscalculating, to no avail.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных