Forum Replies Created

Viewing 15 posts - 7,336 through 7,350 (of 7,613 total)

  • RE: Introduction to Indexes: Part 2 – The clustered index

    Dev (7/9/2012)‘select only a very small % of the total rows’ is applicable to Clustered Index as well for seek operation else it will scan the cluster.

    False, of course. ...

    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: Introduction to Indexes: Part 2 – The clustered index

    Dev (7/8/2012)


    As a matter of fact, you can’t avoid the scans (table / index) in real life or practical scenarios but you can minimize those and that’s what Gail is...

    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: rolling 1 year period - but for completed weeks only

    I suggest avoiding "WEEK" or anything that could or does rely on SQL settings such as @@DATEFIRST (I don't think WEEK actually does, but I think it does always 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: How to use nested IF's to work like a SQL CASE ?

    case

    when degree1id = "@Degree" then (select d.Name from AcademicExperienceTypes d where p.Degree1id=d.Id)

    when degree2id = @Degree then (select d.Name from AcademicExperienceTypes d where p.Degree2id=d.Id)

    when degree3id = @Degree then (select...

    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: How to use nested IF's to work like a SQL CASE ?

    case

    when degree1id = "@Degree" then (select d.Name from AcademicExperienceTypes d where p.Degree1id=d.Id)

    when degree2id = @Degree then (select d.Name from AcademicExperienceTypes d where p.Degree2id=d.Id)

    when degree3id = @Degree then (select...

    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: Introduction to Indexes: Part 2 – The clustered index

    The most important performance aspect of a table is determining the correct clustered index.

    Absolutely, and what I want is one that is narrow - doesn't make nonclustered indexes larger than...

    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: Introduction to Indexes: Part 2 – The clustered index

    GilaMonster (7/6/2012)

    There's only one clustered index, multiple nonclustered indexes, clustered index to organise the table, nonclusters to support the queries.

    Every column added to a query invalidates the existing covering index...

    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: Introduction to Indexes: Part 2 – The clustered index

    An integer column defined as identity (a very good and popular choice for clustered index) is 4 bytes.

    It's certainly popular, but most often not good. The no-thought identity as...

    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: Selecting rows based on row level uniqueness

    CELKO (7/1/2012)[/bCode should be in Standard SQL as much as possible and not local dialect.

    Given that this a SQL Server forum, SQL server dialect is fine. In particular,...

    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: Eager Spool Performance Problem on Large Table INSERT

    Lynn Pettis (7/3/2012)


    ScottPletcher (7/3/2012)


    Also you have 2 very big indexes.One has 10 columns and other has 9 columns .Table just has 12 columns.

    It's a pretty sure bet you have 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: Eager Spool Performance Problem on Large Table INSERT

    Also you have 2 very big indexes.One has 10 columns and other has 9 columns .Table just has 12 columns.

    It's a pretty sure bet you have the wrong clustered index....

    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: How to reduce time in adding PK constraint on a table?

    Lynn Pettis (7/3/2012)


    Doing it something like this:

    alter table MyTable

    Add Constraint [MyPrimaryKey] Primary Key (MyColumn)

    WITH (FILLFACTOR = 75, ONLINE = ON, PAD_INDEX = ON);

    Be sure to verify the complete syntax in...

    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: Indexes.

    During the load in the where clause there is a selection (or join) on the logical key and the row must be actual (Y).

    If the logical key nonclus index needs...

    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: Why is my table so HUGE

    Also, do a

    DBCC UPDATEUSAGE

    on the table. Heaps seem to report ridiculously incorrect page totals too often for comfort. I've had SQL telling me that a single...

    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: Naming a date range based on a Start and end date

    CELKO (6/27/2012)


    ScottPletcher (6/27/2012)


    Regarding date formatting, I'd suggest using 'YYYYMMDD', which is foolproof on SQL Server, rather than 'YYYY-MM-DD', which can fail depending on specific settings in SQL Server.

    NO! That is...

    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 - 7,336 through 7,350 (of 7,613 total)