Hi Please check datatypes in union all part. Possible, notice.id or notice.mbct_id datatypes does not match with other tables. regards, Sergei
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных