Skip to content
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

Trace: provide performance statistics for DDL statements #7208

Closed
pavel-zotov opened this issue Jun 11, 2022 · 0 comments
Closed

Trace: provide performance statistics for DDL statements #7208

pavel-zotov opened this issue Jun 11, 2022 · 0 comments

Comments

@pavel-zotov
Copy link

It would be useful if trace setting print_perf = true could show performance statistics not only for DML but also for DDL statements.
Currently one may see performance data only for 'CREATE INDEX' statement (more accurately: performance of several system queries to RDB tables) .

This is example:

set bail on;
set names utf8;
shell del c:\temp\tmp4test.fdb 2>nul;
create database 'localhost:c:\temp\tmp4test.fdb' user 'SYSDBA' password 'masterkey';

set echo on;

create sequence g_common;
create collation name_coll for utf8 from unicode case insensitive;
create exception ex_context_var_not_found 'required context variable(s): @1 - not found or has invalid value';
create domain dm_idb as bigint;
create table test(id dm_idb not null, x dm_idb);
alter table test add constraint test_pk primary key(id);
create index test_x on test(x);
create view v_test as select * from test;

set term ^;
create trigger trg_test_bi before insert on test as
begin
    new.id = coalesce(new.id, gen_id(g_common,1));
end
^
create procedure sp_test(a_id dm_idb, a_x dm_idb) as
begin
    update test set x =:a_x where id = :a_id;
end
^

No any DDL will have performance 'blocks' in the trace here.
Every of them will be reflected as "0 records fetched / 0 ms".

@hvlad hvlad self-assigned this Jun 11, 2022
hvlad added a commit that referenced this issue Jun 23, 2022
…ements.

Also, enables tracing of user SET TRANSACTION, COMMIT, ROLLBACK statements and hides internal SQL statements run by the engine itself.
hvlad added a commit that referenced this issue Jun 27, 2022
…ements.

Also, enables tracing of user SET TRANSACTION, COMMIT, ROLLBACK statements and hides internal SQL statements run by the engine itself.
@hvlad hvlad closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants