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

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Peter Raaphorst
Posts: 1
Joined: Thu 11 Feb 2016 08:14

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

Post by 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,

Pinturiccio
Devart Team
Posts: 2138
Joined: Wed 02 Nov 2011 09:44

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

Post by 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.

Post Reply