Helene
Member³
We have switched to Delphi 5, and after releasing the new version of our application we receive a lot of feedback on the response times. I have tried searching the v$sqlArea table in Oracle for "worst performing" sql statements in terms of consistent Gets (buffer Gets). There is one query that I cannot find anywhere in the application (I have searched both pas files and dfm files. This SQL is performed very often, actually more often than most of the other SQL statements from the application, and it performs very bad.
This is the SQL statement:
select constraint_name, column_name from sys.all_cons_columns
where owner =
wner and table_name = :table_name
and constraint_name not like 'SYS_C%'
order by constraint_name
I tried to search the entire project also for property setting EnforceConstraints; this property is false in the entire project. Also the constraints property of the TOracleProvider is false everywhere.
Simply starting and closing the application makes this SQL run 4 times, shown from the trace file after running it through TKProf (excluding system-sql):
select constraint_name, column_name from sys.all_cons_columns
where owner =
wner and table_name = :table_name
and constraint_name not like 'SYS_C%'
order by constraint_name
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 4 0.00 0.01 0 0 0 0
Execute 4 0.00 0.00 0 0 0 0
Fetch 4 0.92 0.92 0 48840 0 29
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 12 0.92 0.93 0 48840 0 29
Now I don't know where this SQL comes from and how I can get rid of it / optimize it !! ??
This SQL is not included if I run the previous version of the application, which was built in Delphi 4.
Among other new things we have introduced is the use of TOracleEvent component, listening for alert messages. The Oracle Session is connected at design time, and the DesignConnection property is true.
I really hope you have some advice on how to solve this...
This is the SQL statement:
select constraint_name, column_name from sys.all_cons_columns
where owner =

and constraint_name not like 'SYS_C%'
order by constraint_name
I tried to search the entire project also for property setting EnforceConstraints; this property is false in the entire project. Also the constraints property of the TOracleProvider is false everywhere.
Simply starting and closing the application makes this SQL run 4 times, shown from the trace file after running it through TKProf (excluding system-sql):
select constraint_name, column_name from sys.all_cons_columns
where owner =

and constraint_name not like 'SYS_C%'
order by constraint_name
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 4 0.00 0.01 0 0 0 0
Execute 4 0.00 0.00 0 0 0 0
Fetch 4 0.92 0.92 0 48840 0 29
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 12 0.92 0.93 0 48840 0 29
Now I don't know where this SQL comes from and how I can get rid of it / optimize it !! ??
This SQL is not included if I run the previous version of the application, which was built in Delphi 4.
Among other new things we have introduced is the use of TOracleEvent component, listening for alert messages. The Oracle Session is connected at design time, and the DesignConnection property is true.
I really hope you have some advice on how to solve this...