Performance hit on opening Oracle Data Table due to metadata query using PL/SQL

Performance hit on opening Oracle Data Table due to metadata query using PL/SQL

Postby Peter Raaphorst » Thu 11 Feb 2016 08:41

For some time now we have been noticing this quaint little piece of PLSQL being executed when opening an data table where we provided the SQL queries and Column information. We traced it down to the following method:

protected override DataTable GetSchemaTable()

We have been looking for an off switch for this code being called. Unfortunately, we found none except for overriding it with our own implementation which returns an empty data table.

Returning an empty data table as the schema table doesn’t seem to hurt. So we have the following questions:

1. Is there a reason for the unnecessary (and expensive) metadata query?
2. Is anything going to bite us not having the metadata in this table?
3. Would you be willing to implemented like a SkipMetaDataQuery flag?

All the best,
Peter Raaphorst
 
Posts: 1
Joined: Thu 11 Feb 2016 08:14

Re: Performance hit on opening Oracle Data Table due to metadata query using PL/SQL

Postby Pinturiccio » Mon 15 Feb 2016 13:24

Peter Raaphorst wrote:2. Is anything going to bite us not having the metadata in this table?

OracleDataTable has the MissingSchemaAction property. Set this property to System.Data.MissingSchemaAction.Add, and additional query that gets metadata will not be executed. All the necessary information about columns will be got from the SELECT statement.
Pinturiccio
Devart Team
 
Posts: 1995
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle