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 2005 Forums
 Transact-SQL (2005)
 need to retreive a bulk of data

Author  Topic 

Sivangari
Starting Member

16 Posts

Posted - 2010-08-23 : 10:23:11
i have a table with 40,000 records.Need to retrieve 40,000 data at a single select with good performance.Please help me out. how to select those records.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-23 : 12:56:22
you need to select all the columns or selected ones?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-23 : 13:14:23
Please define "good performance".

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Sivangari
Starting Member

16 Posts

Posted - 2010-08-24 : 00:27:52
Need to select all the column.Good Performance means,while selecting and displaying in front end the application was very slow.It take a long time to show the data.I need to show all the data in good performance .
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-24 : 03:37:53
You will not see good performance if you want to return 40,000 rows. Narrow your result down by either adding a good WHERE clause, or page through your result set by returning the data in batches.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-24 : 03:38:28
quote:
Originally posted by Sivangari

Need to select all the column.Good Performance means,while selecting and displaying in front end the application was very slow.It take a long time to show the data.I need to show all the data in good performance .


Which front end are you using?
If you use VB/VB.NET, you can directly bind the result to a grid that would be faster than looping all the rows

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-24 : 03:39:18
quote:
Originally posted by tkizer

You will not see good performance if you want to return 40,000 rows. Narrow your result down by either adding a good WHERE clause, or page through your result set by returning the data in batches.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog


Tara, you are still online?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-24 : 03:46:37
I got paged to work on a critical production issue. It seems to be an application issue and not a database issue, but I'm waiting around until they say it has been resolved.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Sivangari
Starting Member

16 Posts

Posted - 2010-08-24 : 05:02:13
That is not .net application.Java application and no controls to show the data there.Just will display all the record at a fetch.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-24 : 05:05:55
quote:
Originally posted by Sivangari

That is not .net application.Java application and no controls to show the data there.Just will display all the record at a fetch.


If you are retreiving data one by one, there will be performance issues

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Sivangari
Starting Member

16 Posts

Posted - 2010-08-24 : 05:07:54
So,only i am asking is there any way to avoid this performance issue and the data also should be available in a speed manner
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-24 : 05:11:06
quote:
Originally posted by Sivangari

So,only i am asking is there any way to avoid this performance issue and the data also should be available in a speed manner


If you are showing data in a table, use pagination method. Search for the same in Google/Bing

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -