Forum Replies Created

Viewing 15 posts - 2,881 through 2,895 (of 7,613 total)

  • RE: Horrible performance using sys.dm_os_performance_counters

    Are your CPUs really busy on that server for some reason?

    In my case, I have lots of free CPU, it's I/O that's restraining my system perf.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Horrible performance using sys.dm_os_performance_counters

    PatLap - Wednesday, March 27, 2019 1:39 PM

    Got 78sec CPU time with COUNT and MAXDOP 1.
    The view returns around 11 millions rows. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Horrible performance using sys.dm_os_performance_counters

    Wow, that seems way long for only 38 dbs.

    Force SQL to not parallelize the query, and see how that runs:

    SELECT
    DB_NAME(database_id) AS db_name,
    COUNT(*) / 128.0...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Improve performance of a query by milliseconds. Should I loop the query to extrapolate the stats ?

    How is the underlying table clustered?

    What the most common WHERE conditions used when you read this table?

    The best, most complete solution overall is to best cluster...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Horrible performance using sys.dm_os_performance_counters

    I did get less execution time cost using COUNT() rather than COUNT_BIG():

    SELECT
    DB_NAME(database_id) AS db_name,
    COUNT(*) / 128.0 AS buffer_pool_size_mb
    FROM sys.dm_os_buffer_descriptors WITH (NOLOCK)
    WHERE database_id <> 32767...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: deleting duplicates, even though different key values

    briancampbellmcad - Tuesday, March 26, 2019 11:47 AM

    ScottPletcher - Tuesday, March 26, 2019 11:39 AM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: deleting duplicates, even though different key values

    Yes.


    ;WITH cte_dups AS (
        SELECT *, ROW_NUMBER() OVER(PARTITION BY name ORDER BY id DESC) AS row_num /* keep the HIGHEST/LAST id */
        FROM...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Problem using CTE

    Try it this way:


    SELECT *
    FROM (
      SELECT Sequence#, Member#, Group#
      WHERE Group# = 'PP0018'
    ) AS iq1
    WHERE Sequence# <> CASE...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: More efficient delete sql

    olibbhq - Tuesday, March 26, 2019 10:56 AM

    Bringing a copy of the uuid over from the source to the destination and running...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: More efficient delete sql

    olibbhq - Tuesday, March 26, 2019 9:47 AM

    Hi, thanks for your help in advance. Is there a way to make this query...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Insert to Clustered Index

    Jim-S - Tuesday, March 26, 2019 8:17 AM

    ScottPletcher - Tuesday, March 26, 2019 8:08 AM

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need some help with a query

    Dra-489663 - Tuesday, March 26, 2019 9:05 AM

    It's cool, I figured it out 🙂

    Also I disagree with a "heck of a lot...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Insert to Clustered Index

    I have ruled out blocking.


    How specifically?  That's a lot of LEFT JOINs.  Is it safe to use NOLOCK on those tables?  If so, have you tried that?  (Let...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: A question about the EXISTS operator

    Yes.  You can say either:

    In the old AdventureWorks2016 database
    In ye olde AdventureWorks2016 database

    but I don't think they should be mixed 😉

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 2,881 through 2,895 (of 7,613 total)