BTW, if your queries typically constrain both lastname and firstname, it'd likely be worthwhile to make a 2-column index on lower(btrim(x_lastname)), lower(btrim(x_firstname)) regards, tom lane
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных