Query Memory Usage
My question is about memory usage by user "select" queries.
How does those consume memory resources?
CREATE TABLE TEST.EXAMPLE (
) PARTITIONED BY DATE;
(VAR1=VAR2=VAR3 and DATE1=DATE2)
1. SELECT VAR1, VAR2, VAR3 FROM TEST.EXAMPLE ;
2. SELECT VAR1 FROM TEST.EXAMPLE;
Does 1. query consume 3 times larger than 2. query?
1. SELECT * FROM TEST.EXAMPLE WHERE DATE1='2015-01-01' ;
2. SELECT * FROM TEST.EXAMPLE WHERE DATE2='2015-01-01' ;
Does 1. query consume less than 2. query?
That's because 2. query needs to check all partitions but 1. query needs to check only one partition.
And another question is "When does SELECT queries free their memory"
- EXTRACT AND FREE ONE BY ONE PARTITION
- EXTRACT ALL PARTITIONS AND FREE AT THE END OF QUERY
and if you know any best practice to save memory use of queries