Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How to retrieve partial data in SQL Server ?

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to display 4 columns of a particular table. The browser

is displaying 50 records per page. 'Next' and 'Previous' buttons are

there for navigating through all the records. It may have even 1

million or more records. The table may have n number of records. I am

not getting any problem if the record size is approximately 50,000.

But for large number of records say, 1 lac or more, the browser is

taking too much time...roughly, for 1 lac record it is taking 35

seconds and for 2.5 lac record it is taking 4 the no of

records fetched loading time also increases

exponentially. So, my aim is to collect partial data from the table

and display it. In oracle I can manage it using rownum and minus

clause, efficiently. But in SQL Server I am not able to handle it,

using those technique. My application runs both on Oracle and SQL

Server. Can anybody help me?

For more clarity :::: I want to collect 1 to 50 records from the

table. next time I want to collect records from 51th. position to

100th. position. And then from 101th. position to 15oth. and so on.
Of course in SQL Server.

I am writing my code in JSP.

Thanks -

[ July 21, 2005: Message edited by: samit majumdar ]
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are some notes on prior pagination discussions. See if any of these ideas fit your situation. Let us know if you think of better ones!
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if i want to develop the list which shows only 10 records at a time but the table may have 50,000 qualifiing
records for my query ..i have to naigaet using the prev and fwd buttons what is the best way to do....
i tried setFetcsize(num); but in vain...
is there any link that i can use it for iterate the resultset (10 records at a time) ,
i stored the romnum in session for each fwd button i increased by "10" and send to database is this
way appreciatable..
Pls suggest
I knew that guy would be trouble! Thanks tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic