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. Database & SysAdmin
  3. Database
  4. Timeourt

Timeourt

Scheduled Pinned Locked Moved Database
databasecsharpsql-serversysadminhelp
12 Posts 8 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.
  • L Offline
    L Offline
    logicon
    wrote on last edited by
    #1

    Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks

    G L T J 4 Replies Last reply
    0
    • L logicon

      Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks

      G Offline
      G Offline
      Goutam Patra
      wrote on last edited by
      #2

      Increase CommandTimeout period to avoid this error

      logicon wrote:

      50000000+ rows

      However I would suggest whenever you are pooling such a huge data in one dataset, if possible, try to fetch data in small chunks.

      1 Reply Last reply
      0
      • L logicon

        Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks

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

        millions of rows in a DataGridView? I pity the users then. This forum holds some 50,000 messages, yet you see only a few (say 25) of them at once. :)

        Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

        Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

        D 1 Reply Last reply
        0
        • L logicon

          Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks

          T Offline
          T Offline
          thatraja
          wrote on last edited by
          #4

          logicon wrote:

          50000000+ rows

          It's horrible to load at a time, use paging technique in query. An example SQL Server 2005 Paging Results[^]

          thatraja |Chennai|India|


          Brainbench certifications
          Down-votes are like kid's kisses don't reject it :-)
          Do what you want quickly because the Doomsday on 2012 :-)

          1 Reply Last reply
          0
          • L Luc Pattyn

            millions of rows in a DataGridView? I pity the users then. This forum holds some 50,000 messages, yet you see only a few (say 25) of them at once. :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            D Offline
            D Offline
            David Mujica
            wrote on last edited by
            #5

            Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:

            L L 2 Replies Last reply
            0
            • D David Mujica

              Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:

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

              you're talking to the wrong person here. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

              Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

              D 1 Reply Last reply
              0
              • L Luc Pattyn

                you're talking to the wrong person here. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

                Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

                D Offline
                D Offline
                David Mujica
                wrote on last edited by
                #7

                Yep. I replied to the wrong thread. My previous comment should have been applied to the original author, "logicon". Sorry Luc.

                1 Reply Last reply
                0
                • D David Mujica

                  Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:

                  L Offline
                  L Offline
                  logicon
                  wrote on last edited by
                  #8

                  Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.

                  P M 2 Replies Last reply
                  0
                  • L logicon

                    Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.

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

                    Use a DataReader to write a CSV file -- the user can then open the CSV in Excel. Slick as snot.

                    1 Reply Last reply
                    0
                    • L logicon

                      Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.

                      M Offline
                      M Offline
                      Mycroft Holmes
                      wrote on last edited by
                      #10

                      Use SQL server to output the resultset to a CSV file on a shared folder - slicker than snot!

                      Never underestimate the power of human stupidity RAH

                      P 1 Reply Last reply
                      0
                      • M Mycroft Holmes

                        Use SQL server to output the resultset to a CSV file on a shared folder - slicker than snot!

                        Never underestimate the power of human stupidity RAH

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

                        Not as portable as snot.

                        1 Reply Last reply
                        0
                        • L logicon

                          Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks

                          J Offline
                          J Offline
                          jschell
                          wrote on last edited by
                          #12

                          logicon wrote:

                          I have a table with 50000000+ rows in SQL Server 2008 R2 Express...Datagridview

                          You need to change your requirements. And what is the growth rate of this table? What happens when it is 10 times bigger than it is now?

                          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