This is a discussion on Which is Preferred within the ASP forums, part of the Programming Talk category; I was counting the records in my recordset. For doing this there are various ways. I tried with both count() ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I was counting the records in my recordset. For doing this there are various ways. I tried with both count() and also by using a variable and incremented the variable inside the recordset as the pointer moves on each recordset. Though both fetched the same result my query is whether there is any difference in performance between the two approach and which one is preferred than other. Kindly also state the reason for the same which would help me to get a better idea.
|
|
|||
|
Definitely your first method of using count () is preferred when compared with the other method of using a variable and incremented the variable inside the recordset as the pointer moves on each recordset. This is because the database activity involved with the latter method is much and when you use this in a situation of having number of users with numerous records definitely there would be decrease in performance due to increase in database activity. Also in addition your recordset would be actively kept until you finish the whole process. So comparing all this the best preferred method out of the two suggested is the use of count ().
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SAP BASIS ADMINISTRATOR with minimum 2 yrs of exp AT Atos Origin | admin | Experienced Job Seekers - India | 0 | 02-15-2006 07:14 AM |
| Open Positions GE (GTO) | kalareddy | Experienced Job Seekers - India | 0 | 06-23-2005 08:23 PM |
| Openings with Deloitte | techguru | Experienced Job Seekers - India | 0 | 06-03-2005 10:25 PM |