Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2012
    Posts
    33

    Unanswered: A lot of recrods in database

    Hello

    I have 4000 records in database ( sql server 2008 ), my application communicate with database by means of framework simple data. In moment when I clicked "Clients" in my appliaction, this program suspended one short time.

    How acceleration read records in database or code application. I would like apply component BackgroundWorker, this is profesional?

    I greet

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    4000 rows is nearly nothing to SQL Server 2008. It will comfortably handle a terrabyte of data spread across several thousand tables. Just to set a benchmark, do a SELECT * FROM myTable query while using an RDP connection or from the server console... It should take around a second or so.

    It is possible that you are doing queries that can be optimized, but you'll have to analyze them to understand that.

    I'd be surprised if the BackGroundWorker will help much unless your application is doing a LOT of processing on every row.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Your application is most likely looping through the data one client at a time rather than leveraging the set-based operations available with relational database servers.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Mar 2013
    Posts
    10
    Run this to see what is going on
    select
    sp.spid,
    sp.hostname,
    db_name(sp.dbid) as [Database],
    sp.[status],
    sp.blocked,
    b.[text] as 'Current SQL Stmt'
    from master..sysprocesses sp
    outer apply sys.fn_get_sql ( Sql_Handle ) b

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •