Trace: add hash value for text of every executed statement
----------------------------------------------------------
Key: CORE-5736
URL: http://tracker.firebirdsql.org/browse/CORE-5736
Project: Firebird Core
Issue Type: Improvement
Components: Engine, TRACEMGR
Affects Versions: 3.0.3, 4.0 Beta 1, 2.5.9
Reporter: Pavel Zotov
Priority: Minor
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 already 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 ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel