Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. (related to prasadbuddhika's problem) retrieving huge amount of data

(related to prasadbuddhika's problem) retrieving huge amount of data

Scheduled Pinned Locked Moved C#
databasehelp
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yasithl
    wrote on last edited by
    #1

    is there any special way of retrieving data from a huge database , because i've developed an app that reads from database and returns a dataset.then in the app using the dataset i fill a listview with each record in dataset. when the records increasing in the DB the time taken to fill the list view also increasing,(i'm using a simple select * query) so i want to reduce this time .

    yasith

    L E L 3 Replies Last reply
    0
    • Y Yasithl

      is there any special way of retrieving data from a huge database , because i've developed an app that reads from database and returns a dataset.then in the app using the dataset i fill a listview with each record in dataset. when the records increasing in the DB the time taken to fill the list view also increasing,(i'm using a simple select * query) so i want to reduce this time .

      yasith

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Break it up into chunks using LIMIT keyword, that way your application has less to retrieve per each view. You can put a simple button to go to next page etc.

      1 Reply Last reply
      0
      • Y Yasithl

        is there any special way of retrieving data from a huge database , because i've developed an app that reads from database and returns a dataset.then in the app using the dataset i fill a listview with each record in dataset. when the records increasing in the DB the time taken to fill the list view also increasing,(i'm using a simple select * query) so i want to reduce this time .

        yasith

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        Don't use a dataset. They are crippling memory hogs. For large amounts of data you need to use a data reader. If the data is sufficiently large you need to break the return up into chucks.

        Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
        If you don't ask questions the answers won't stand in your way.
        Most of this sig is for Google, not ego.

        P 1 Reply Last reply
        0
        • E Ennis Ray Lynch Jr

          Don't use a dataset. They are crippling memory hogs. For large amounts of data you need to use a data reader. If the data is sufficiently large you need to break the return up into chucks.

          Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
          If you don't ask questions the answers won't stand in your way.
          Most of this sig is for Google, not ego.

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Hear hear! DataSet is evil!

          1 Reply Last reply
          0
          • Y Yasithl

            is there any special way of retrieving data from a huge database , because i've developed an app that reads from database and returns a dataset.then in the app using the dataset i fill a listview with each record in dataset. when the records increasing in the DB the time taken to fill the list view also increasing,(i'm using a simple select * query) so i want to reduce this time .

            yasith

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Hi, some controls don't need all the data all the time, they can run in virtual mode, needing only the data that is actually visible at any point in time. They fire an event when they need more data to show it. DataGrid is one of those controls. :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            - before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups