cancel
Showing results for 
Search instead for 
Did you mean: 

Question regarding the partition table

Level 2 Adventurer

Question regarding the partition table

Hi All

 

I use EDB 9.5, memory usage is high with the below SQL:

 

DELETE  FROM tb1 WHERE parentid in (select r_id from tb2 where parent_id in ( select r_id from appli_ent where link = $1))

 

tb1 is a partition table, but after I changed  partition table tb1’s partition time interval from 6 minutes/partition to 1 day/partition, the SQL's memory usage became much lower,

 

1.) I want to know why the above SQL used a lot of memory for 6 minutes/partition?  

 

2.) Why the above SQL’s memory usage became much lower after I changed  partition table tb1’s partition time interval from 6 minutes/partition to 1 day/partition?

 

3.) What is the relation between SQL’s memory usage and time-based partition table’s partition time interval ?

2 REPLIES 2
EDB Team Member

Re: Question regarding the partition table

Hi Roger,

 

Hope you are doing good.

 

Before you could comment on your questions , we need the below information.

>Could you please share the structure of table tb1 and tb2 . (\d+ table_name)
> Output of the below command for both the cases while partition time interval is 6 minutes and 1 day
explain analyze verbose DELETE FROM tb1 WHERE parentid in (select r_id from tb2 where parent_id in ( select r_id from appli_ent where link = $1));

 

Level 2 Adventurer

Re: Question regarding the partition table

Hi SwagataBanik

 
 
 
 
 
 
 
 
Thank you for your reply.