Forum Replies Created

Viewing 15 posts - 1 through 15 (of 7,629 total)

  • Reply To: Perfermance result aftet purge operatio

    It's true that single seeks will see no difference from a reduction in data.

    However, a seek and scan will still benefit.

    Yes, overall you should see improvement.  If you have a...

    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: Trigger isn't working

    1.  OK, but the "inserted" table in the trigger should be joining to the same table name as the trigger is fired on, right?, on the source table, not on...

    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: Trigger isn't working

    2 qs:

    1. Shouldn't you be joining on the ID = ID and not on ID = images?
    2. Is it possible that [Front Image Alarm Status] can be NULL?  If so,...

    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: Force join by longest possible choice

    You're welcome!  Very glad it helped.  Thanks for the nice feedback.

    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: SQL Server Storage Optimization: Multiple Files in a Filegroup vs Dedicated File

    Honestly, I think the biggest payback will be from page compressing the data (whether you use separate filegroups or not).

    As always, it's vital to have the best clustered index on...

    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: Force join by longest possible choice

    For example,

    SELECT t1...., ca1....
    FROM dbo.table1 t1
    CROSS APPLY (
    SELECT TOP (1) ...
    FROM dbo.table2 t2
    WHERE t2.column LIKE...

    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: Force join by longest possible choice

    Yes.  Use a CROSS APPLY or OUTER APPLY (rather than a JOIN) with a TOP (1) ORDER BY LEN(<matched_column>) DESC

    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: A design question in a parent child relationship

    b) there could be an issue if the flag in the Task table doesn't match the data in the vendors table. In other words, if the task is marked complete,...

    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: A design question in a parent child relationship

    Option 1 has performance issues.

    Not necessarily.

    Qs:

    1. Are all Vendors added to the Task when the Task is created, or can Vendors be added later?
    2. Can a Task be "Uncompleted"?  That...

    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: Querying Multiple Tables for the Same Information

    Dynamically create a view that references all the applicable tables at the moment your code started running.

    For example, roughly like this.  [Edits in italics] You didn't give any real details...

    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: Massive Table Growth Issue – How to Set Up Filegroup Usage Alerts?

    To make it (much) less fragile, I would likely automate the creation of the Alerts by using a proc, via sp_add_alert.

    The proc would take in the % size as a...

    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: Massive Table Growth Issue – How to Set Up Filegroup Usage Alerts?

    You can create a standard SQL alert that is based on the db size (in KB) exceeding whatever amount you specify.

    In SQL Server Agent; "Alerts"; "New Alert"; "SQL Server performance...

    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: STRING_AGG DISTINCT

    Interesting q.  No, haven't done that.

    I guess easiest would be to use a subquery, which you're already familiar with, so that's not what you're looking for, but just to 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: In-place OS upgrade or migration to new OS?

    Definitely use new VMs.  Too many installation settings could matter here.  The new VM approach also allows you to test with a db to two without having to wait for...

    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 with TEXTIMAGE_ON option

    No, I don't think you would.  I don't think TEXTIMAGE_ON clause is allowed is a partition scheme is used (based on MS documentation).  Sorry, I don't have time to test...

    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 - 1 through 15 (of 7,629 total)