Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 return all recordsets in one step?

Author  Topic 

nic
Posting Yak Master

209 Posts

Posted - 2004-01-22 : 11:39:58
Hi,
I have a process where I will need to return about 20 recordsets. Would it be better to call one sproc (containing sub-sprocs) and return all data in one step, or is it better to call the individual sub-sprocs where each sub-sproc would contain around 5 recordsets? This is an ASP.NET app so I'm not sure what is better performance wise. Is opening the database connection 1 time (and returning a large about of data) better that 5 times (with smaller pieces of data). I know ASP.NET uses connection pooling etc so does it really make a difference?

Thanks

Nic

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-01-22 : 12:43:20
IMO, it would be better to break the stored procedure up into smaller stored procedures. It makes it more manageable. As far as SQL Server, I don't think that you see a performance improvement or degradation whichever way you went. But I don't know about ASP.NET.

Tara
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-01-22 : 14:22:48
you don't need to keep closing and reopening the database connection to run multiple stored procedures. just open the connection and keep reusing it until you're done, and then close it.

- Jeff
Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2004-01-23 : 08:19:01
I'm half way thru a book ADO.NET by David Sceppa.
I found someone elses review almost scary in how close it
describes my experience.

This book was very instrumental in my leap from classic ADO to ADO.Net. The book is very easy to follow and gives good code examples. The book gives a great introduction to all the key principles of ADO.Net and won't leave you stranded without a clue.The only downsides to this book are:The book is written for both C# and VB.Net development and would have been very thin if not so. The book was a very quick read, only taking about 4 days to finish. More detail could have been given in the space taken. The other problem I had was that the cover of the book came unglued from the book when I was about 1/2 way through, which wasn't pleasing to say the least.Lastly, some examples contain errors, which only slightly takes away from the greatness of the book.Based on content and how easy it was to pick up on ADO.Net I have to give 4 stars.
I spent almost 8 months struggling with ADO .NET, bought a couple of books and just could't get it done efectively. Thank God for David Sceppa and this wonderful book.From the very first page you start getting what's going on, and how you must get things done, no goofing around, just a very simple explanation of the concept, and then an example in both VB and C#, which is great because I'm thinking of moving away from VB and get into C#.Every single object is clearly explained here, DataSets, DataTables, DataRows, Connections, Commands, DataReaders, DataAdapters, DataViews, and each of them's got all its proerties and methods thouroughly explained.Before reading this book I was builduing an application with ADO .Net and it had the worst, dirtiest code you've ever seen, after reading this book, my code has reduced itself about 60%, and is cleaner, more understandable and it will be much easier to maintain.There just can't be a better book to get up to speed with ADO .Net, it is really a must have.
This is the one stop shop for everything you wanted to know about ADO.NET. Author compares features with ADO, gives those cool performance tricks that every one wants to know especially web developers. Examples in both Visual Basic .Net and C# covering every minor property and method. I am glad I gulped through the whole book in a week like a novel


It is a rich creamy color with a high fat content of 5-7 percent. Being so high in fat, it is usually processed into butter, cheese, or yogurt. An average cow will produce 110 kg. Milk in a lactation period of an average of 149 days
Go to Top of Page
   

- Advertisement -