You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:15:48 UTC

[jira] [Created] (TRAFODION-368) LP Bug: 1328628 - QueryCacheEntries() returns query cache entries of the arkcmp process, but not the embedded compiler

Alice Chen created TRAFODION-368:
------------------------------------

             Summary: LP Bug: 1328628 - QueryCacheEntries() returns query cache entries of the arkcmp process, but not the embedded compiler
                 Key: TRAFODION-368
                 URL: https://issues.apache.org/jira/browse/TRAFODION-368
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: Julie Thai
            Assignee: Howard Qin


select * from table(QueryCacheEntries()) returns the query cache entries of the arkcmp process, but not the embedded compiler. Conferred with developer: best to file a bug, even though this is really a request for a new feature - need to change the interface to talk to the local, embedded arkcmp instead of a separate process. Maybe need to have two such functions, one for embedded and one for the separate compiler. 

To reproduce:
create table qc001tb (a int not null primary key, b int);
cqd QUERY_CACHE '0';
cqd QUERY_CACHE reset;
cqd QUERY_CACHE_STATEMENT_PINNING 'ON';
cqd QUERY_TEXT_CACHE 'OFF';
cqd QUERY_TEMPLATE_CACHE 'ON';
select count(*) from table(QueryCacheEntries());
insert into qc001tb values (17702,23503);
insert into qc001tb values (48,7196);
insert into qc001tb values (9294,9091);
--had expected to see insert stmt in result set
select plan_id, text from table(QueryCacheEntries());

This was generated on rhel-cdh1, datalake_64_1 v40963, via sqlci:
>>create table qc001tb (a int not null primary key, b int);
 
--- SQL operation complete.
>>cqd QUERY_CACHE '0';
 
--- SQL operation complete.
>>cqd QUERY_CACHE reset;
 
--- SQL operation complete.
>>cqd QUERY_CACHE_STATEMENT_PINNING 'ON';
 
--- SQL operation complete.
>>cqd QUERY_TEXT_CACHE 'OFF';
 
--- SQL operation complete.
>>cqd QUERY_TEMPLATE_CACHE 'ON';
 
--- SQL operation complete.
>>select count(*) from table(QueryCacheEntries());
 
(EXPR)              
--------------------
 
                   0
 
--- 1 row(s) selected.
>> 
>>insert into qc001tb values (17702,23503);
 
--- 1 row(s) inserted.
>>insert into qc001tb values (48,7196);
 
--- 1 row(s) inserted.
>>insert into qc001tb values (9294,9091);
 
--- 1 row(s) inserted.
>> 
>>select plan_id, text from table(QueryCacheEntries());
 
PLAN_ID               TEXT
--------------------  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
  212268070210768716  select check_option, is_updatable, is_insertable from TRAFODION."_MD_".VIEWS where view_uid = 87293180548053995 for read committed access                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  212268070210469939  select trim(O.catalog_name || '.' || '"' || O.schema_name || '"' || '.' || '"' || O.object_name || '"' ) constr_name, trim(O2.catalog_name || '.' || '"' || O2.schema_name || '"' || '.' || '"' || O2.object_name || '"' ) table_name from TRAFODION."_MD_".UNIQUE_REF_CONSTR_USAGE U, TRAFODION."_MD_".OBJECTS O, TRAFODION."_MD_".OBJECTS O2, TRAFODION."_MD_".TABLE_CONSTRAINTS T where  O.object_uid = U.foreign_constraint_uid and O2.object_uid = T.table_uid and T.constraint_uid = U.foreign_constraint_uid and U.unique_constraint_uid = 87293180548054000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
  212268070210440815  select column_name, column_number, keyseq_number, ordering , cast(0 as int not null) from TRAFODION."_MD_".KEYS where object_uid = 87293180548054000 for read committed access order by keyseq_number                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  212268070210375630  select O.object_name, C.constraint_type, C.col_count, C.constraint_uid from TRAFODION."_MD_".OBJECTS O, TRAFODION."_MD_".TABLE_CONSTRAINTS C where O.catalog_name = 'TRAFODION' and O.schema_name = 'SEABASE' and C.table_uid = 87293180548053995 and O.object_uid = C.constraint_uid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
  212268070210312810  select O.catalog_name, O.schema_name, O.object_name, I.keytag, I.is_unique, I.is_explicit, I.key_colcount, I.nonkey_colcount from TRAFODION."_MD_".INDEXES I, TRAFODION."_MD_".OBJECTS O where I.base_table_uid = 87293180548053995 and I.                                             
  212268070210295816  select column_name, column_number, keyseq_number, ordering, cast(0 as int not null)  from TRAFODION."_MD_".KEYS where object_uid = 87293180548053995 and nonkeycol = 0 for read committed access order by keyseq_number                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
  212268070210276021  select column_name, column_number, column_class, fs_data_type, column_size, column_precision, column_scale, datetime_start_field, datetime_end_field, trim(is_upshifted), column_flags, nullable, trim(character_set), default_class, default_value, trim(column_heading), hbase_col_family, hbase_col_qualifier, direction, is_optional  from TRAFODION."_MD_".COLUMNS where object_uid = 87293180548053995 and direction in ('  ')order by 2 for read committed access                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
  212268070210263015  select is_audited from TRAFODION."_MD_".TABLES where table_uid = 87293180548053995 for read committed access                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
  212268070210255491  select object_uid, object_type from TRAFODION."_MD_".OBJECTS where catalog_name = 'TRAFODION' and schema_name = 'SEABASE' and object_name = 'QC001TB'  and object_type = 'BT'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
  212268070210232368  select count(*) from TRAFODION."_MD_".OBJECTS where catalog_name = 'TRAFODION' and schema_name = 'SEABASE' and object_name = 'QC001TB'  and valid_def = 'Y';                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
 
--- 10 row(s) selected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)