Oracle performance programming: .NET
In Oracle SQL High Performance tuning, I included an appendix in which I outlined how to achieve good cursor management, bind variables and array processing in the major languages of the day. I had intended to do the same in Oracle Performance Survival Guide, but I ran out of time and space in the book. So the examples in the book are generally in Java or PL/SQL only.
I wanted to get up to date on the various languages, some of which (like Python) I haven't used for a while and others (Ruby for instance) I've never used with Oracle. So I thought I'd kill two birds with one stone by writing a series of blog posts on how to program efficiently in the various languages.
There's lots of best practices in each language, but I think most of us would agree that you at least need to know how to do the following:
- Use bind variables appropriately.
- Ensure you are performing array fetch when retrieving more than one row
- Ensure that you use array insert when doing bulk inserts
The ways of doing this are different in each language. In Chapter 6 of Oracle Performance Survival Guide, I describe these techniques and their performance implications, using Java and sometimes PL/SQL examples. In this series I'll go through the techniques for other languages.
Let's start with ODP.NET, which is Oracle's ADO.NET driver for .NET languages such as C#, VB.NET and Powershell (see here for a posting on using Oracle with powershell).