Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If a table contains 20000 records . In a page at each time
100 records to be displayed. What are the steps u will take
to improve performance? will you use dataset or datareader?

Answers were Sorted based on User's Feedback



If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / vijay

we have to use a dataset because on using datareader
forward only paging can be achieved. Suppose if you are at
1000 page and you want to go back to 999th page, if you use
datareader it cannot be achieved, since it does not support
backward navigation.
Dataset supports forward and backward navigation

Is This Answer Correct ?    7 Yes 0 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / anna

we have to use datareader.
because it is more faster & efficient than dataset.

Is This Answer Correct ?    3 Yes 1 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / ashok

This can be done using following ways. Mainly its base on
multitreading environment.

1. Declare delegate (I am using Async delegate)
2. Start a new thread which will gets a data information in
collection or we can fill the dataset.
3. In main thread you can keep polling to the datafill
thread whether the operation is complete or not.
4. with IAsyncResult we can find whether the thread which we
started earlier has completed the assigned task or not.

Is This Answer Correct ?    1 Yes 0 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / renjith t n

You need to look at ROW_NUMBER() to do this effectively.
Temp tables, cursors are to costly.

CREATE PROCEDURE myProc

@StartIndex INT
@MaxRecords INT

AS

SET @StartIndex = @StartIndex + 1

SELECT
first_name,
last_name,
middle_init
FROM
(SELECT
first_name,
last_name,
middle_init
ROW_NUMBER() OVER(ORDER BY last_name)
AS rownum
FROM
Users)
AS Users
WHERE
rownum between @StartIndex and (@StartIndex + @MaxRecords) -
1

Then we can use Dataset for best performance..

Is This Answer Correct ?    1 Yes 0 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / vijay

answer # 3 is really appreciate me thanks for giving
correct answer. i ve tested with sqldatasource with
gridview and change datasourcemode to datareader giving
error u must use dataset..

Is This Answer Correct ?    0 Yes 0 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / kumar vaibhav

Create a stored procedure with parameter page size and current page index.Get the lower bound and upper bound of the page by using following formula

Lower bound=Pagesize*PageIndex+1
Upper Bound=lowerbound+pagesize

call this Stored Procedure on every paging event of gridview.

Is This Answer Correct ?    0 Yes 1 No

If a table contains 20000 records . In a page at each time 100 records to be displayed. What are t..

Answer / nitin

DataReader is better Choice for this type of Task becoz
DataReader is Read only, forward only access to data in
Connected Environment.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More ADO.NET Interview Questions

What is the current version of entity framework?

0 Answers  


Which is better ole db or odbc?

0 Answers  


What providers do you use to connect to oracle database ?

4 Answers   Digital GlobalSoft,


What is Serialization in .NET? what are the types of Serialization?

0 Answers   Arigo Infotech,


How do you find the count of records in a dataset?

0 Answers  


How to creating a SqlCommand Object?

0 Answers   Arigo Infotech,


Difference between OLEDB Provider and SqlClient ?

2 Answers  


Explain executenonquery?

0 Answers  


Explain sqlconnection object?

0 Answers  


What is the use of connection object in ado.net?

0 Answers   TryTechnicals Pvt Ltd,


Which method do you invoke on the DataAdapter control to load your generated dataset with data?

4 Answers  


What is the role of the dataset object in ado.net?

0 Answers  


Categories