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.
| Author |
Topic |
|
gssokhey
Starting Member
2 Posts |
Posted - 2009-09-28 : 02:14:52
|
| Hello Everyone,I had a view which use to fetch lacs of records to be displayed in a SSRS report, but it aborts since the amount of data is too much to be processed, hence came the question of performance in picture. The same applies to me with Oracle, though I got a solution for Oracle I am looking for something similar in SQL Server.Oracle provides BULK COLLECT as one of the option to improve performance, i.e. In a stored procedure first of all I need to define a cursor, Open the cursor using BULK COLLECT option and fill it in a Global Temp table. From this temp table I can fetch records and display it on report.I am looking for similar functionality in SQL Server.RegardsGS |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-28 : 02:28:42
|
you mean you are using Cursor to fetch thousands of records ? Why not set based ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
gssokhey
Starting Member
2 Posts |
Posted - 2009-09-28 : 03:58:51
|
Thanks KH for the reply... Can you please provide me an example for the same?quote: Originally posted by khtan you mean you are using Cursor to fetch thousands of records ? Why not set based ? KH[spoiler]Time is always against us[/spoiler]
RegardsGS |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-09-28 : 04:10:01
|
It all depends on what are you doing inside the cursor loop. If you are just looping to display the data, in the cursor declaration section, the SELECT query is actually set based query.Why don't you post your cursor query here and we will take a look at it KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|