-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebird 5 profiler error with subselects #7553
Comments
Please test in next snapshot. |
Testing WI-T5.0.0.1035 Firebid 5.0 Beta 2. The profiler runs without errors now, even with complex SPs, which use dozens of other SPs and recursion, great, thanks! Please include a simple evaluation example in the release notes on how to interprete records and numbers. Right now I can't tell if the reported numbers are plausible. For example, a test run of a SP needed a total execution time of 344 milliseconds as reported by the dba tool (Flamerobin) , but the biggest total_elapsed_time reported by Similar, the same test: I assume precision is 100 nanoseconds? plg$prof_sessions was always emptied before the test, only data of a single session was present. Should I post a new issue and test case? |
The timings are nanosecond-based. My tests based on https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.profiler.md shows correct timings. If yours don't, post a reproducible test case with your timings and detailed explanations of what is not matching. |
|
I get 1303032597, which matches my execution time of ~1.3s. Don't it work this way for you? What's your OS? |
I was testing in Linux. Now I see that in Windows precision is different. |
Fixed in #7562 |
Done in #7563. |
Testing profiler with WI-T5.0.0.973 Firebid 5.0 Beta 1. It seems to handle subselects incorrectly. This test case
`set term !;
execute block
as
declare dummy varchar(200);
declare num bigint;
begin
select rdb$profiler.start_session('Profile Session 1') from rdb$database into :num;
num = 1;
if (:num in (select rdb$linger from rdb$database)) then
dummy = 'xxx';
execute procedure rdb$profiler.finish_session(true);
end!
set term ;!`
fails to write profile data to the snapshot tables and creates a message in firebird.log like e.g.:
Profiler flush
violation of FOREIGN KEY constraint "PLG$PROF_RECORD_SOURCES_CURSOR_FK" on table "PLG$PROF_RECORD_SOURCES"
Foreign key reference target does not exist
Problematic key value is ("PROFILE_ID" = 56, "STATEMENT_ID" = 41327, "CURSOR_ID" = 2)
The text was updated successfully, but these errors were encountered: