concat function is HQC cached, but plan for query with concat operator (||) is not HQC cacheable.

Bug #1359971 reported by Julie Thai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
Medium
taoufik ben abdellatif

Bug Description

>>cqd HQC_LOG 'ON';

--- SQL operation complete.
>>cqd HQC_LOG_FILE 'hqc.log';

--- SQL operation complete.
>>cqd HYBRID_QUERY_CACHE 'ON';

--- SQL operation complete.
>>cqd QUERY_CACHE_USE_CONVDOIT_FOR_BACKPATCH 'ON';

--- SQL operation complete.
>>prepare XX from select CONCAT('AAA', 'BBB') from f00;

--- SQL command prepared.
>>prepare XX from select 'AAA' || 'BBB' from f00;

--- SQL command prepared.
>>prepare XX from select 'CCC' || 'DDD' from f00;

--- SQL command prepared.
>>prepare XX from select CONCAT('AAA', 'BBB') from f00;

--- SQL command prepared.
>>prepare XX from select 'AAA' || 'BBB' from f00;

--- SQL command prepared.
>>prepare XX from select CONCAT('EEE', 'FFF') from f00;

--- SQL command prepared.

From hqc.log:
HQC::AddEntry():
SQL query=select CONCAT('AAA', 'BBB') from f00;
HQC key=SELECT CONCAT ( 'AAA' , 'BBB' ) FROM F00 ;

Not HQC Cacheable but added to SQC:
SQL query=select 'CCC' || 'DDD' from f00;
HQC key=SELECT #? || #? FROM F00 ;
Found in HQC:
SQL query=select CONCAT('AAA', 'BBB') from f00;
HQC key=SELECT CONCAT ( 'AAA' , 'BBB' ) FROM F00 ;

HQC backpatch OK:
SQL query=select CONCAT('AAA', 'BBB') from f00;
HQC key=SELECT CONCAT ( 'AAA' , 'BBB' ) FROM F00 ;

HQC::AddEntry():
SQL query=select CONCAT('EEE', 'FFF') from f00;
HQC key=SELECT CONCAT ( 'EEE' , 'FFF' ) FROM F00 ;

Tags: sql-cmp
Changed in trafodion:
assignee: nobody → taoufik ben abdellatif (taoufik-abdellatif)
Changed in trafodion:
status: New → In Progress
Revision history for this message
taoufik ben abdellatif (taoufik-abdellatif) wrote :

there are two supported syntax variations for the concat string function. CONCAT: this form is supported and cacheable. "||" : this form is not supported and renders the query not cacheable. Changes have been committed.

Changed in trafodion:
status: In Progress → Fix Committed
Changed in trafodion:
milestone: none → r0.9
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.