Forum Replies Created

Viewing 15 posts - 15,121 through 15,135 (of 49,552 total)

  • RE: SELECT query with "Writes" ?!

    stryk (12/21/2012)


    But they ran the Index Rebuild on that table which seems to help a lot! So, for now we will schedule this maintenance daily ...

    No, don't. Run an Update...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: What is better: single or multiple datafile (mdf) in user database for better performance?

    ico-601891 (12/21/2012)


    What is better to have a unique datafile or have multiple datafile for better performance

    It depends. There is no simple answer to that question. Depends on the physical...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: HOW TO GET THE VALUE OF SQL TABLE ROW INDEX

    Why looping? SQL doesn't need any form of looping to get master-detail information. You'd write a single query with a join across the two tables. Something like this:

    SELECT Master.Col1, Master.Col2,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Remove blocking due to LCK_M_S and LCK_M_U

    Please post the deadlock graph and the definition of all indexes on the involved tables.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Msg 542: An invalid datetime value was encountered. Value exceeds the year 9999

    David Paskiet (12/20/2012)


    There has to be an easier way! I am all ears and open to a better way!

    See the kb article referenced in the article I mentioned.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: ORDER BY Should be same as my input in IN()

    Josh Ashwood (12/20/2012)


    GilaMonster (12/20/2012)


    Can you imagine all the simple

    SELECT Foo FROM Foo, Bar WHERE Foo.X *= Bar.Y

    haha *=

    Now that is real dinosaur stuff!!

    You'd think so,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Partitioning Error

    Bhuvnesh (12/20/2012)


    GilaMonster (12/20/2012)


    You specified the partition ranges yourself.

    CREATE PARTITION FUNCTION PartitionDB_PartitionRange (INT)

    AS RANGE LEFT FOR VALUES (500,1000,2500);

    So here partition 1 means "Less than 500" ?

    That's what your partition function...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Add Data files dynamically based no of cpu's

    Err...bad idea. Really bad idea.

    One file per core is an old recommendation, it's not a good idea under all circumstances without consideration or investigation.

    http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-%281230%29-tempdb-should-always-have-one-data-file-per-processor-core.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Msg 542: An invalid datetime value was encountered. Value exceeds the year 9999

    Run CheckDB with the Data_Purity option. For Resolving the error, see the section in this article on data purity errors and the kb article it links to.

    http://www.sqlservercentral.com/articles/65804/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Remove blocking due to LCK_M_S and LCK_M_U

    Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs. Post the result of that graph here.

    DBCC TRACEON(1222,-1)

    Please...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Remove blocking due to LCK_M_S and LCK_M_U

    npranj (12/20/2012)


    Would this help?

    WAITFOR DELAY '00:00:00.05' -- Wait for 5 ms

    As in, if you get a deadlock, ignore it and try again, repeat until successful? Sure, I wouldn't call it...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Tsql script 2012 Unused and needed indexes, usage, pages etc... and creates the index needed

    If you're thinking of automatically, with no investigation, creating any indexes suggested by the missing index DMVs and dropping any that the index usage stats say are unused, don't.

    Missing indexes...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Log file moving

    Let me guess... Full recovery model and no log backups. When maintained properly, the space in the log file is reusable. See the recommended article

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: DBCC Page

    It can read any page that is in the database. Like with all other operations that read pages, it will read the page from cache. If the page isn't in...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Partitioning Error

    You specified the partition ranges yourself.

    CREATE PARTITION FUNCTION PartitionDB_PartitionRange (INT)

    AS RANGE LEFT FOR VALUES (500,1000,2500);

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 15,121 through 15,135 (of 49,552 total)