Page 1 of 1

extra running sql by component

Posted: Wed 11 Apr 2012 14:46
by saitsari
hi,
I upgraded our component 5.5 to 8.14.
but some queries are slower in 8.14.
I catch the sql by sql monitor.
I find some extra queries that sended by component and it take long time
around 1 second. So that it causes forms opening time is take long time.

For example as follows:

Timestamp: 13:26:33.503
SELECT '' TABLE_CATALOG, IC.TABLE_OWNER TABLE_SCHEMA, IC.TABLE_NAME, '' INDEX_CATALOG, IC.INDEX_OWNER INDEX_SCHEMA,
IC.INDEX_NAME, IC.COLUMN_NAME, IC.COLUMN_POSITION, DECODE(IC.DESCEND, 'ASC', 0, 1) DESCENDING FROM SYS.ALL_IND_COLUMNS IC,
SYS.ALL_INDEXES I WHERE IC.TABLE_OWNER = 'HASTANE' AND IC.TABLE_NAME = 'HASTARND' AND I.UNIQUENESS = 'UNIQUE' AND I.OWNER =
IC.INDEX_OWNER AND I.INDEX_NAME = IC.INDEX_NAME ORDER BY IC.INDEX_OWNER, IC.TABLE_OWNER, IC.TABLE_NAME, IC.INDEX_NAME,
IC.COLUMN_POSITION
----------------------------------
Timestamp: 13:26:34.379

Posted: Thu 12 Apr 2012 09:36
by bork
Hello

ODAC uses this query to detect primary key or any other unique index, that is required for generating Update, Insert or Delete SQL. Please, try to set the KeyFields property manually. In this case ODAC will not run this additional query.

If this solution doesn't help, then, please, send us Delphi code, that reproduces your issue and the SQL script for creating a table or tables, which are used in your sample.