Issue Details (XML | Word | Printable)

Key: CORE-5736
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Vlad Khorsun
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Trace: add hash value for text of every executed statement

Created: 01/Feb/18 09:23 PM   Updated: 02/Feb/18 11:29 AM
Component/s: Engine, TRACEMGR
Affects Version/s: 3.0.3, 4.0 Beta 1, 2.5.9
Fix Version/s: None

QA Status: No test


 Description  « Hide
It will be very useful to have ability for quick find in a trace log with huge size some HASH value of statement that was executed.
Consider following sketch:

EXECUTE_STATEMENT_FINISH -------------------------------- [ 1 ]
select <...>
from test1 a
left join test2 b on ...
left join test3 c on ...
...
where <expr_for_a,b,c>
< POOR EXECUTION AND TABLE STATISTICS HERE >

EXECUTE_STATEMENT_FINISH
<... some_other_complex_query_2 ...>

EXECUTE_STATEMENT_FINISH
<... yet_another_complex_query_3...>

EXECUTE_STATEMENT_FINISH -------------------------------- [ 2 ]
select <...>
from test1 a
left join test2 b on ...
left join test3 c on ...
...
where <expr_for_a,b,c>
< POOR EXECUTION AND TABLE STATISTICS HERE >

When someone will read text below [ 2 ] , he can recall that PROBABLY the same query was already registered before, in [1 ].
But how one may easy and fast to compare such text blocks ? They often take about 50-70 lines of code, and - moreover - this code can be machine-generated.
Of course we can make copy-paste these queries in two diff. files and than compare them. But this is completely inconvenient.

So, please consider ability to add some king of hash value for each executed statement, like this:

2018-02-01T12:20:23.4500 ( <HASH_STRING_FOR_STATEMENT_HERE> ) EXECUTE_STATEMENT_FINISH
prodbase (ATT_29570445, JOHN:MANAGER, UTF8, TCPv4:172.16.190.9)
c:\temp\my_app.exe:4724
(TRA_738419170, READ_COMMITTED | REC_VERSION | WAIT | READ_ONLY)

Statement 108112340:
-------------------------------------------------------------------------------
select count(*) from ...

/*
CURRENTLY within parenthesis there is always the same value (and i don't understand what does it mean). Can we replace it with more useful one ?
*/

PS.
And if it is possible, may be the same hash value can be added for mon$statements.mon$sql_text ?


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.