Extra query on Oracle Catalog

From: M. Marco (xxxxx_at_xxxx.it)
Date: 11/27/03


Date: Thu, 27 Nov 2003 10:55:31 +0100

We developed some applications using Delphi 5 with ADOExpress (last version)
and Oracle 9.0.2 (Note: the problem that I'm issuing is present on Oracle
8.1.7 and 9.0.1).

Every time we execute a query with the clause DISTINCT (ex. select distinct
<field name> from <table name>) we have in Oracle an extra query on catalog
like this one:

=====================

PARSING IN CURSOR #2 len=459 dep=0 uid=23 oct=3 lid=23 tim=1068659324648452
hv=588531779 ad='14699470'

select * from (select null TABLE_CATALOG, ac.owner TABLE_SCHEMA,
ac.table_name TABLE_NAME, acc.column_name COLUMN_NAME, null COLUMN_GUID,
null COLUMN_PROPID, acc.position ORDINAL from all_constraints ac,
all_cons_columns acc where ac.owner = acc.owner and ac.table_name =
acc.table_name and ac.constraint_type = 'P' and ac.constraint_name =
acc.constraint_name) DBSCHEMA_PRIMARY_KEYS WHERE TABLE_SCHEMA = 'UNISALUTE'
AND TABLE_NAME = 'TBUTENTE' order by 3, 4

=====================

PARSING IN CURSOR #1 len=122 dep=0 uid=23 oct=3 lid=23 tim=1068659324679353
hv=553312342 ad='4893300'

SELECT DISTINCT U.CODUTENTE CODUTENTE, U.USERID DESCRIZIONE
FROM TBUTENTE U WHERE U.CODUTENTE = 'VIGNOLIR'

The extra query is not time consuming but CPU consuming (they are a lot).

Distinct is one case; we didn't find other situations like this.

Has Anyone had this problem?

Thank you in advance for any suggestion.



Relevant Pages

  • Re: limit TABLE to only one record
    ... without issuing any DDL statements. ... I'm guessing that a TABLE with one ... ID and DATA are both reserved words in Oracle. ...
    (comp.databases.oracle.server)
  • Re: Refresh data from Remote View
    ... Atleast until they exit the application and reenter it. ... The views are from Oracle 9 tables. ... Besides issuing a Requery(), what can be done so that the users can see the updated data in these tables? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: OT: MySQL query: Order By
    ... Oracle are still, for example, issuing ... > Security patches maybe - bug tars definitely not. ... Sure - but when did you last come across a bug in Oracle after Oracle ... masse relative to the small amount of DBA effort actually involved - but ...
    (uk.rec.motorcycles)