The query in question is likely performing badly because of this: -> Seq Scan on fr13t1 (cost=0.00..25072.50 rows=311800 width=21) (actual time=0.007..115.766 rows=311800 loops=1) Filter: (fr01codemp = '1'::smallint) Buffers: shared hit=21175Just how selective is fr01codemp = '1'::smallint ? Is there an index on that column ?
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных