Forum Replies Created

Viewing 15 posts - 451 through 465 (of 7,613 total)

  • Reply To: Index help - Performance issue

    Yes, the script is 100% safe to run in a prod environment.

    It does change a couple of settings for max efficiency, but first it captures the current settings and reinstates...

    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".

  • Reply To: Index help - Performance issue

    That looks far more like what I would expect (even with only 2 days' worth of activity).

    I can tell you that (1) you have the correct clustered index (2) I...

    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".

  • Reply To: Index help - Performance issue

    Not much showing.  Only thing you can really do for now is REORGANIZE the columnstore index(es).

    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".

  • Reply To: Index help - Performance issue

    Unfortunately there's very little activity against this table shown in the stats -- no more than 5 days' worth of activity.  Either SQL was restarted or a change was made...

    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".

  • Reply To: Index help - Performance issue

    Was the first result set empty??!

     

    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".

  • Reply To: Index help - Performance issue

    Not nearly enough to go on to analyze indexes.

    If you'll run this script and post the two results from it, we can go further from there.  PRIOR to running, be...

    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".

  • Reply To: Incorrect syntax near the keyword 'Plan'.

    SELECT 
    p.name AS [Plan], --<<--
    --everything else same as before--

    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".

  • Reply To: Exclude Particular Table While Trigger Executes

    I would think you'd need to just do this:

    ...
    BEGIN TRY
    IF @object NOT IN ('TableA', 'TableB') --<<--
    BEGIN --<<--
    SET @subject = @@SERVERNAME + N' : ' + @event +...

    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".

  • Reply To: partitioning a table

    Are you partitioning the table solely to improve SELECT performance?

    How is the table clustered?  That is, what is the clustered index on the table now.  If the clus index starts...

    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".

  • Reply To: auto refresh a query result (F5) in SSMS

    DECLARE @time_to_stop_running time
    SET @time_to_stop_running = '4:30PM'

    WHILE 1 = 1
    BEGIN
    SELECT <column(s)>
    FROM dbo.<your_error_table>
    WHERE ...
    ...

    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".

  • Reply To: The place of SMALLDATETIME

    CreateIndexNonclustered wrote:

    ScottPletcher wrote:

    The business I'm at certainly doesn't require more than 200 gender "types."  Neither does yours I'm sure, nor anyone else's at this point (I guess some ultra-woke colleges...

    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".

  • Reply To: The place of SMALLDATETIME

    CreateIndexNonclustered wrote:

    ScottPletcher wrote:

    CreateIndexNonclustered wrote:

    sean redmond wrote:

    Thank you all.

    And as for space, if we have 100GB of data, then we have a 100GB of data. But I'd rather have 90GB data if...

    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".

  • Reply To: The place of SMALLDATETIME

    CreateIndexNonclustered wrote:

    sean redmond wrote:

    Thank you all.

    And as for space, if we have 100GB of data, then we have a 100GB of data. But I'd rather have 90GB data if that simply...

    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".

  • Reply To: Find the records based on group by Student ID

    drew.allen wrote:

    ScottPletcher wrote:

    SELECT Student_ID
    FROM dbo.table_name
    GROUP BY Student_ID
    HAVING MAX(CASE WHEN Student_Status = '2' THEN 1 ELSE 0 END) = 1 AND
        MAX(CASE WHEN Student_Status <> '2' THEN...

    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".

  • Reply To: The place of SMALLDATETIME

    If you're that worried about space, you could just a minutes displacement from Jan 01, 2023.  So, midnight on that date would be 0.  2PM would be 14*60, etc..  Not...

    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 - 451 through 465 (of 7,613 total)