Forum Replies Created

Viewing 15 posts - 1,726 through 1,740 (of 7,619 total)

  • Reply To: sql backup for big database in 4 steps

    Johan Bijnens wrote:

    Oh BTW, On top of compression, you may also want to fiddle around with following settings to see what works best for you !

    --Media Set Options
    ...

    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: Huge size of Reporting tables

    (1) As always, the first step is to make sure you have the very best clustered index on every table of significant size.  That is not an easy thing 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".

  • Reply To: COUNT(ID COLUMN) not using Clustered Index

    Hmm, the first part of the Answer you chose is correct.  But keep in mind that the second part, the "P.S.", is 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".

  • Reply To: Using NOLOCK in UPDATE or DELETE

    frederico_fonseca wrote:

    that is where some disagree.

    on my 1500 production db's 220 have RCSI enabled - and most new db's are being created with it enabled unless the team requesting it...

    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 backup for big database in 4 steps

    (1) Have you page compressed any (or better yet all) of the really large tables?  And used COMPRESS/DECOMPRESS if it's clob data? [If you're on SQL 2016+ then even Standard...

    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: Using REVERSE

    For example:

    ALTER TABLE #ACME ADD 
    new_column1 uniqueidentifier NOT NULL DEFAULT NEWID(),
    new_column2 int IDENTITY(1, 1) NOT NULL;

    SELECT ca1.*
    FROM #ACME A
    CROSS...

    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: Using REVERSE

    Jeff Moden wrote:

    ScottPletcher wrote:

    You don't really need a pk or any other column from the main table.  Also, I assumed you're rather see blank than NULL for missing levels, but 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: COUNT(ID COLUMN) not using Clustered Index

    Lord Slaagh wrote:

    Hello SSC,

    ... When I run... SELECT CustomerID, execution plan shows that it is hitting the correct Clustered Index.

    Dave

    Hmm, that doesn't seem right.  You must have added other columns 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".

  • Reply To: COUNT(ID COLUMN) not using Clustered Index

    Jeff Moden wrote:

    Although the PK is frequently also the clustered index, it's not necessarily so.  The keys of non-clustered indexes include the keys of the clustered index, which isn't necessarily 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".

  • Reply To: Using NOLOCK in UPDATE or DELETE

    I manage hundreds of prod dbs (and hundreds of qa ones) and I have roughly a dozen that have RCSI.  The overhead is just so high.  [And if you want...

    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: Using REVERSE

    You don't really need a pk or any other column from the main table.  Also, I assumed you'd rather see blank than NULL for missing levels, but if not, just...

    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: Using REVERSE

    First, you should encode the string values to a numeric equivalent.  Imagine what must happen now when the name of a level changes.  For example, say that "Outdoor Accessories" had...

    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: Including certain columns creates long query time

    For just that specific column, you need to rebuild one of the existing indexes:

    CREATE NONCLUSTERED INDEX [IX_game_boxscore_players_personID] 
    ON [mlb_json].[game_boxscore_players] ( [boxscore.players.person.id] )
    ...

    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: Including certain columns creates long query time

    Need to see the DDL including the index definitions for all tables in the 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".

  • Reply To: Using NOLOCK in UPDATE or DELETE

    ScottPletcher wrote:

    ScottPletcher wrote:

    MMartin1 wrote:

    I still have to wonder on the appropriate use of NOLOCK. Even if the data does not change in a table, is 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".

Viewing 15 posts - 1,726 through 1,740 (of 7,619 total)