Skip to Content
Essential ADO.NET
book

Essential ADO.NET

by Bob Beauchemin
May 2002
Beginner to intermediate content levelBeginner to intermediate
560 pages
11h 36m
English
Addison-Wesley Professional
Content preview from Essential ADO.NET

3.7. Command Preparation, Cancellation, Timeouts, and Cleanup

The IDbCommand interface has a method called Prepare, which makes a round-trip to the database to tell the database to Prepare the statement and cache it in its query cache for later use. Because all modern databases cache query plans without asking, the only thing Prepare buys you with most databases is a little faster execution speed the first time the query is executed; you also get some control over the lifetime of the query plan. This comes at the expense of a database round-trip, so its usefulness is questionable—although, on a busy system, a statement that isn't prepared could have its query plan flushed, depending on the query cache management policy of the database. Although ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® ADO.NET 4 Step by Step

Microsoft® ADO.NET 4 Step by Step

Tim Patrick
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 0201758660Purchase book