Re: JOIN on partitions is very slow

2020-03-23 Thread Thomas Kellerer
Michael Lewis schrieb am 23.03.2020 um 17:16: Yes. I can tweak the query. Version of postgres is 9.5.15. I have about 20 partitions for company_sale_account table. I do have an index on company name. I need to use DISTINCT as i need to remove the duplicates. DISTINCT is a sign of improper join

Re: JOIN on partitions is very slow

2020-03-23 Thread Michael Lewis
On Mon, Mar 23, 2020 at 1:40 AM daya airody wrote: > Yes. I can tweak the query. Version of postgres is 9.5.15. I have about 20 > partitions for company_sale_account table. > I do have an index on company name. > > I need to use DISTINCT as i need to remove the duplicates. > DISTINCT is a sign o

Re: Partition Pruning (Hash Partitions) Support for DELETEs in PostgreSQL 11 and 12

2020-03-23 Thread Ronnie S
Thanks! On Mon, Mar 23, 2020 at 12:10 AM Justin Pryzby wrote: > On Sun, Mar 22, 2020 at 11:45:53PM -0400, Ronnie S wrote: > > Hello All, > > > > While doing some tests with hash partitioning behavior in PG11 and 12, I > > have found that PG11 is not performing partition pruning with DELETEs > >

Re: JOIN on partitions is very slow

2020-03-23 Thread daya airody
Yes. I can tweak the query. Version of postgres is 9.5.15. I have about 20 partitions for company_sale_account table. I do have an index on company name. I need to use DISTINCT as i need to remove the duplicates. Thanks for your time. On Sun, Mar 22, 2020 at 11:38 PM Michael Lewis wrote: > A