Reputation: 1109
I have an asp.net page which needs to return an object with a one-to-many relationship. i.e. there is a single header row followed by an unspecified number of data rows. Typically there will be between 1 and 10 rows, so I'm not dealing with a huge amount of data here - just a page that is called frequently.
I know that the OLE provider supports the SHAPE command which allows hierarchical data to be returned, but I'm using SQLDataReader (ADO?) which doesn't support it. The question is, what is best practice/best performance here?
Upvotes: 1
Views: 415
Reputation: 690
I don't have experience with SHAPE so I don't know if it performs well. Of the other three options, Option #4 is absolutely the most efficient because it minimizes both trips to the database and duplication of data.
Upvotes: 1