David Smith

David Smith

  • NA
  • 2k
  • 0

Database performace help

Feb 11 2012 10:39 PM
I have a question, do you think its wise, I am looking for speed performance. Lets say I have 300,000 records in the database.  Basically I want to Execute the fill  below before or load the data before entire application loads. I would have a progress bar that basically letting the user data is being loaded. One thing I did notice once the I have executed fill before, I use linq to pull  from the properties below, the queries works fast.

private databaseDataSet.testTable redTable { get; set; }
private databaseDataSet.testTable blueTable { get; set; }
private databaseDataSet.testTable purpleTable { get; set; }
private databaseDataSet.testTable greenTable { get; set; }
private databaseDataSet.testTable yellowTable { get; set; }
private databaseDataSet.testTable brownTable { get; set; }


        /// <summary>
        /// Initializes the data.
        /// </summary>
        public void InitializeData()
        {

            this.TableAdapter1.Fill(databaseDataSet.red);
            redTable = databaseDataSet.red;

            this.TableAdapter2.Fill(databaseDataSet.blue);
            blueTable = databaseDataSet.blue;

            this.TableAdapter3.Fill(databaseDataSet.green);
            greenTable = databaseDataSet.green;

            this.TableAdapter4.Fill(databaseDataSet.yellow);
            yellowTable = databaseDataSet.yellow;

            this.TableAdapter5.Fill(databaseDataSet.purple);
            purpleTable = databaseDataSet.purple;

            this.TableAdapter6.Fill(databaseDataSet.brown);
            brownTable = databaseDataSet.brown;

        }

Answers (8)