Forum Replies Created

Viewing 15 posts - 3,721 through 3,735 (of 7,619 total)

  • RE: Indexing strategy on a highly transient table

    Jeff Moden - Wednesday, October 11, 2017 10:28 PM

    ScottPletcher - Tuesday, October 10, 2017 11:46 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: Columnstore index question

    Interesting on the smaller ones.  Probably just SQL generating a non-optimal query plan.  You can probably resolve that; worst case, you'd have to use a "hint" to force SQL to...

    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: Indexing strategy on a highly transient table

    That makes sense, sorry about the rant.  It's just that I've seen far too many database "designs" where every table got an identity clustering key slapped on it before the...

    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: Columnstore index question

    It would very likely help performance.  Certainly if:

    1) you created a nonclustered columnstore index that covered the query entirely.
    Or
    2) the total rows you're retrieving were not 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".

  • RE: Indexing strategy on a highly transient table

    TheSQLGuru - Tuesday, October 10, 2017 12:58 PM

    ScottPletcher - Tuesday, October 10, 2017 11:46 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: Indexing strategy on a highly transient table

    giles.clapham - Thursday, October 5, 2017 10:43 AM

    Obviously I have an index on MonitoredValueInUseByID and that is the CLUSTERED INDEX.
    I have...

    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: Convert the string value to multiple rows in sql server

    sgmunson - Thursday, October 5, 2017 7:05 AM

    declare @name varchar(10) = 'Server';

    SELECT TOP (LEN(@name)) SUBSTRING(@name, ROW_NUMBER() OVER(ORDER BY (SELECT NULL)), 1)
    FROM sys.all_objects;

    This...

    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: select count of rows based on condition

    bartedgerton - Wednesday, October 4, 2017 1:33 PM

    I prefer to use COUNT because I think it is more readable.  I usually use...

    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: Update a #temptable IF @Table_Variable

    Never use ISNULL in a WHERE clause: not only is it unsargable [not relevant in this particular case], but it can also make the code harder to understand.  The code...

    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: Database design to handle Millions of records

    The single most important thing is to do a logical data model before doing a physical database model.

    Hints:
    1) Google "logical data modeling".  
    2) Fillfactor, indexes...

    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: select count of rows based on condition

    select 
    SUM(CASE WHEN TYPE ='D' THEN 1 ELSE 0 END) AS 'TotalXRows',
    SUM(CASE WHEN TYPE ='L' THEN 1 ELSE 0 END) AS 'TotalYRows',
    SUM(1)  AS 'TotalRows'
    from dbo.Table with (nolock)

    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: Alter Table....Add Column

    GilaMonster - Friday, September 29, 2017 2:53 PM

    Arsh - Friday, September 29, 2017 8:35 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: ?? on Finding records with caharacters before and after in a string??

    I'm not entirely sure of your intended search rules either, but as best I can tell I think this should get you close:

    WHERE ColumnName + '.' LIKE '%[^0-9]1...

    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: Code-first vs database-first, any new developments?

    Chris Wooding - Thursday, September 28, 2017 1:03 AM

    sgmunson - Tuesday, September 26, 2017 10:35 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: Alter Table....Add Column

    There's a huge difference between with and without a default.

    If there's a default value, SQL has to modify metadata and add write that default value to every row...

    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 - 3,721 through 3,735 (of 7,619 total)