[DCS] query with long query text is missing from METRIC_QUERY_TABLE

Bug #1411541 reported by Feng, Qiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
New
High
Tharak Capirala

Bug Description

QUERY_TEXT is VARCHAR(50000 CHARS) in METRIC_QUERY_TABLE.
Set dcs.server.user.program.statistics.type to 'query' to publish every query.
When running a query with query text longer than 50000, it did not published to METRIC_QUERY_TABLE.
Should the query text be trimed to fit the datatype and got published?

Revision history for this message
Feng, Qiang (qiang-feng) wrote :

Error detail - *** ERROR[8402] A string overflow occurred during the evaluation of a character expression. Convers
ion of Source Type:VARCHAR(REC_BYTE_V_ASCII,50040 BYTES,UTF8) Source Value:insert into VITO_TEST.tab1 values (1,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa to Target Type:VARCHAR(REC_BYTE_V_ASCII,200000 BYTES,UTF8). [2015-01-16 07:
49:56] has occurred.

error was seen in master_exec logs.

Changed in trafodion:
importance: Undecided → High
Revision history for this message
Anoop Sharma (anoop-sharma) wrote :

right now, metric_query_table contains fields for error text, explain and query text.
It limits the max length of these fields.

what we need to do is to add another repos table that can store large strings
by chunking them into multiple rows using id, seqNum. Metric_query_table will
contain an id that can be used to read and write from/into this new repos table.

This will be similar to metadata TEXT table which is used to store constraints,
views, etc, of arbitrary length and are pointed to by an id from the original metadata table.

If query text can fit in the predefined fields, then we will store it inlined. If it exceeds
that length, then it will be stored in REPOS_TEXT table and a identifier will be stored
in metric_query_table.

We should not store truncated information for query text or explain otherwise one
will not be able to use it correctly at a later time.

Changed in trafodion:
assignee: nobody → Anoop Sharma (anoop-sharma)
milestone: none → r1.1
Revision history for this message
Feng, Qiang (qiang-feng) wrote :

To be clear, no row of the query stats published into METRIC_QUERY_TABLE, not just the query_text.

Revision history for this message
Anoop Sharma (anoop-sharma) wrote :

If no statistics are being added to repository, then this is an issue with conn.
Forwarding to conn group.

Changed in trafodion:
assignee: Anoop Sharma (anoop-sharma) → Tharak Capirala (capirala-tharaknath)
Revision history for this message
Tharak Capirala (capirala-tharaknath) wrote :

Hi Vito,

Just to clarify...are you saying there are no rows written to the repository table at all if the query text is > its column size or just that the query text column is empty?

Please confirm.

Thanks

Revision history for this message
Aruna Sadashiva (aruna-sadashiva) wrote :

Hi Tharak,

There is no row written to repository if query_text > its column size.

There is an error logged in the log file, and looks like insert failed.

Vito is out for 2 weeks.

Regards.
-Aruna

Changed in trafodion:
milestone: r1.1 → r2.0
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.