TUniquery performing Index querys in every execution

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pimentel_flores
Posts: 31
Joined: Wed 15 Aug 2007 16:30
Location: mexico

TUniquery performing Index querys in every execution

Post by pimentel_flores » Sun 09 Aug 2015 01:22

Hello, There is a post from 2008 regarding the same issue http://forums.devart.com/viewtopic.php?f=28&t=13020

I'm running Unidac 4.6.12 For Delphi 2007

Everytime i do a uniquery.execute i see the below query being executed, and it is logged by mysql as an non optimal query, how to fix this, i need my app to run faster and seems that this query is causing performance issues.

also my tuniquerys cannot be static, they change the sql.text property on the fly so everytime they call different tables so i cannot set the keyfields static

# Query_time: 0.000588 Lock_time: 0.000149 Rows_sent: 0 Rows_examined: 422
SELECT cast('' as char(1)) TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION POSITION, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH DATA_LENGTH, NUMERIC_PRECISION DATA_PRECISION, NUMERIC_SCALE DATA_SCALE, (case IS_NULLABLE when 'YES' then 1 else 0 end) NULLABLE, COLUMN_DEFAULT DEFAULT_VALUE FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'mq_gpojamco' AND TABLE_NAME = 'TABLENAME' ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
# Query_time: 0.000588 Lock_time: 0.000149 Rows_sent: 0 Rows_examined: 422

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TUniquery performing Index querys in every execution

Post by AlexP » Mon 10 Aug 2015 09:48

Hello,

I have answered you in this topic http://forums.devart.com/viewtopic.php?t=13020 .
Please don't create similar topics.

Post Reply