Loading ...
Sorry, an error occurred while loading the content.

integrating datatable pagination with database paging

Expand Messages
  • erincarikan
    I don t know if somebody worked with 10000 records in the datatable but if you have 10 columns for each record, things become little bit painful in the
    Message 1 of 6 , Jun 20, 2007
    • 0 Attachment
      I don't know if somebody worked with 10000 records in the datatable but
      if you have 10 columns for each record, things become little bit
      painful in the clientside. If you have a low memory, computer will
      freeze and so on. Therefore I'm thinking about, instead of dumping
      everything to client we can page in the database and every time paging
      link is clicked we can go and get the next set of records. Is there a
      working example for this. Because I am little bit confused about how to
      coordinate sorting with database calls.

      Thanks

      Erinc Arikan
    • j2eeconsulting
      I saw somewhere in the docs that pagination of a huge dataset like this is still best done on the server. The thing is, there are tons of ways to do pagination
      Message 2 of 6 , Jun 20, 2007
      • 0 Attachment
        I saw somewhere in the docs that pagination of a huge dataset like this
        is still best done on the server. The thing is, there are tons of ways
        to do pagination on the server ,and all have their pluses and minuses.
        It's pretty simple to do. Before we started doing most pagination on
        the client with DataTable (there are uncommon times when you'd want to
        actually ask a user to page amongst 10,000 rows; typically you'd want
        to return a "please narrow your search" error) we used this tag library:

        http://displaytag.sourceforge.net

        It works pretty well, the main gripe being that you can't specify
        a "type" on the column like you can with DataTable, and of course that
        it does http round trips for paging which is best avoided via DataTable
        unless huge datasets are required for some reason.
      • erincarikan
        That s pretty cool, but i can neither switch from yui tables to display tables in the project nor I can say narrow down your search, because the main purpose
        Message 3 of 6 , Jun 28, 2007
        • 0 Attachment
          That's pretty cool, but i can neither switch from yui tables to
          display tables in the project nor I can say narrow down your search,
          because the main purpose of my table is to make the admin see 15000
          users.
          When you bring upto 5000 users waiting time is somehow bearable. but
          after that you start to wait for 15 secs, which is not cool.
          sometimes you get browser alerts like system is getting unresponsive.
          I guess in the future releases there won't be any functionality like
          support for serverside paging or on-demand loading. I really wonder
          how can this achieved by using nice interface of yui datatable. I
          guess something can be achieved with playing around with paging
          events and asynchronous calls to the web services, and changing the
          stored procs that gets the data. But instead of reinventing the
          wheel, If there's a working example of this somewhere in blogs, it
          might be a life saver.

          Regards

          Erinc

          --- In ydn-javascript@yahoogroups.com, "j2eeconsulting"
          <j2eeconsulting@...> wrote:
          >
          > I saw somewhere in the docs that pagination of a huge dataset like
          this
          > is still best done on the server. The thing is, there are tons of
          ways
          > to do pagination on the server ,and all have their pluses and
          minuses.
          > It's pretty simple to do. Before we started doing most pagination
          on
          > the client with DataTable (there are uncommon times when you'd want
          to
          > actually ask a user to page amongst 10,000 rows; typically you'd
          want
          > to return a "please narrow your search" error) we used this tag
          library:
          >
          > http://displaytag.sourceforge.net
          >
          > It works pretty well, the main gripe being that you can't specify
          > a "type" on the column like you can with DataTable, and of course
          that
          > it does http round trips for paging which is best avoided via
          DataTable
          > unless huge datasets are required for some reason.
          >
        • j2ee20072007
          Two questions: 1) Why does the user have to see 150,000 rows? 2) Why can you use display:table?
          Message 4 of 6 , Jul 3, 2007
          • 0 Attachment
            Two questions:

            1) Why does the user have to "see" 150,000 rows?

            2) Why can you use display:table?
          • erincarikan
            I finally managed it to work, if you want to implement this just because you have so many records and get the ie is getting unresponsive error, here are some
            Message 5 of 6 , Jul 4, 2007
            • 0 Attachment
              I finally managed it to work, if you want to implement this just
              because you have so many records and get the ie is getting
              unresponsive error, here are some tips. You have to sacrifice from
              client side column sorting, it's better to embed that functionality
              to the server side or to the stored procedure if you don't use
              caching. You have to override populateTable, onEventSortColumn,
              sortColumn, showPage methods. It will be wise to get the total number
              of records in your database beforehand, in populatetable using this
              value as total number of records. Rest is pretty easy, if you don't
              know how to implement db paging with your stored proc, this links
              might help you to modify yours:

              http://www.davidhayden.com/blog/dave/archive/2005/12/30/2652.aspx
              http://www.sql-server-performance.com/ak_ranking_functions.asp

              If you use ajax and try to get large datasets, just take in
              consideration that execution order might change according to time it
              takes to finish executing for the call, so try not to have more than
              one aysnchronous call at a time, watch out what you are calling after
              asynchronous call and try to call populateTable when you are sure
              that you get results back.

              Erinc
              --- In ydn-javascript@yahoogroups.com, "erincarikan"
              <erincarikan@...> wrote:
              >
              > That's pretty cool, but i can neither switch from yui tables to
              > display tables in the project nor I can say narrow down your
              search,
              > because the main purpose of my table is to make the admin see 15000
              > users.
              > When you bring upto 5000 users waiting time is somehow bearable.
              but
              > after that you start to wait for 15 secs, which is not cool.
              > sometimes you get browser alerts like system is getting
              unresponsive.
              > I guess in the future releases there won't be any functionality
              like
              > support for serverside paging or on-demand loading. I really wonder
              > how can this achieved by using nice interface of yui datatable. I
              > guess something can be achieved with playing around with paging
              > events and asynchronous calls to the web services, and changing the
              > stored procs that gets the data. But instead of reinventing the
              > wheel, If there's a working example of this somewhere in blogs, it
              > might be a life saver.
              >
              > Regards
              >
              > Erinc
              >
              > --- In ydn-javascript@yahoogroups.com, "j2eeconsulting"
              > <j2eeconsulting@> wrote:
              > >
              > > I saw somewhere in the docs that pagination of a huge dataset
              like
              > this
              > > is still best done on the server. The thing is, there are tons of
              > ways
              > > to do pagination on the server ,and all have their pluses and
              > minuses.
              > > It's pretty simple to do. Before we started doing most pagination
              > on
              > > the client with DataTable (there are uncommon times when you'd
              want
              > to
              > > actually ask a user to page amongst 10,000 rows; typically you'd
              > want
              > > to return a "please narrow your search" error) we used this tag
              > library:
              > >
              > > http://displaytag.sourceforge.net
              > >
              > > It works pretty well, the main gripe being that you can't specify
              > > a "type" on the column like you can with DataTable, and of course
              > that
              > > it does http round trips for paging which is best avoided via
              > DataTable
              > > unless huge datasets are required for some reason.
              > >
              >
            • j2ee20072007
              ... I m struggling to find where you did something new; there are only two ways to do page, server side and client side. It sounds like what you did was
              Message 6 of 6 , Jul 5, 2007
              • 0 Attachment
                --- In ydn-javascript@yahoogroups.com, "erincarikan" <erincarikan@...>
                wrote:
                >
                > I finally managed it to work, if you want to implement this just

                I'm struggling to find where you did something new; there are only two
                ways to do page, server side and client side. It sounds like what you
                did was rebuild display:table You're using the database to do paging?
                That's a terrible solution imho.
              Your message has been successfully submitted and would be delivered to recipients shortly.