On Mon, Jan 13, 2025 at 05:26:09PM +0300, Eşref Halıcıoğlu wrote: > Hello, > > I have a query in PostgreSQL and I want this query to retrieve only data from the last 3 months. However, when I examine the query > plan, I see that all partitions are listed. Please note that your explain is for update, not select (which "retrieve" in your mail would suggest). > This raises a few questions in my mind: > > • Are all partitions really being accessed, or only the partitions of the last 3 months are being accessed while the other > partitions have to be shown in the query plan? Not really possible to tell without reading explain *analyze*. Potentially all. But perhaps just fewer. Best regards, depesz