thank you very much you take for your time We raised the work_mem to 130 mb and there was no more problem! Now we are seeing to improve the query, it is complicated because it is generated by a product that we have installed in production! -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html