[Mono-dev] OdbcDataReader enhancement

Ernesto equistango at gmail.com
Tue Jul 8 19:33:51 EDT 2008


Hi, I was taking a look at OdbcDataReader.cs and found something that 
got my attention: a call to GetSchemaTable() in the class' constructor.

The DataReader is supposed to be a very fast reader for forward-only 
queries, and getting complete schema information on every DataReader is 
a very expensive (and unsolicited) operation. The call seems completely 
unnecesary to me. Only  column information is necessary.

This patch replaces two calls to GetSchemaTable() for calls to a new 
function GetColumns().
It works perfectly in my tests and it's way much faster. Can someone 
please review and comment?

Regards,
Ernesto

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: datareader_enhancement.path
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080708/cb6cf116/attachment.pl 


More information about the Mono-devel-list mailing list