Forum Replies Created

Viewing 15 posts - 3,766 through 3,780 (of 7,613 total)

  • RE: Index Seek not possible if you want every row of table, correct?

    If I want EVERY row from the table (customers) then... I will always have to do a table SCAN, yes?

    Not necessarily.  It depends at least 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".

  • RE: SQL Server retrieval unit

    Minimum disk read would be 8K, the size of a single SQL page.  SQL does indeed organize 8 8K pages into 64K extents, but I don't believe SQL has 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: using calculated column to calculate another column in the same view simplified way

    Most often you can use CROSS APPLY to assign an alias name to a calculated value, which you can then use in the main query or in another CROSS APPLY,...

    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 do incremental loading without date filters

    First I'd suggest looking into "Change Tracking".  That would accurately identity any/all rows that have been modified since a certain date, and it wouldn't limit you to 4 days, you...

    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 the space /shrink SQL Server 2008 R2 Data file (MDF) and Log file (LDF)

    You also need to verify that the log is in status to be shrunk, like so:

    SELECT log_reuse_wait_desc, *
    FROM sys.databases
    WHERE name = '<your_db_name>'

    If 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: Best Approach For Junction Table Mainrenace

    It would be more efficient to UPDATE existing rows and only add new rows, but if the number of rows is not too large just deleting and adding probably wouldn't...

    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: Difference in row-size between what was expected and what was — can anyone explain please?

    GilaMonster - Thursday, August 10, 2017 7:51 AM

    ScottPletcher - Thursday, August 10, 2017 7:45 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: Difference in row-size between what was expected and what was — can anyone explain please?

    ben.brugman - Thursday, August 10, 2017 6:03 AM

    ScottPletcher - Tuesday, August 8, 2017 9:38 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: INFORMATION_SCHEMA views

    I believe the I_S views are ANSI/ISO standard.  MS themselves were pushing them at one time. But they are too out of sync with the actual system catalog, i.e., too...

    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: INFORMATION_SCHEMA views

    I never use the I_S views.  I've found them to be very slow and to cause blocking at times.  I know their official view definitions don't show why that would...

    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: Difference in row-size between what was expected and what was — can anyone explain please?

    Sean Redmond - Tuesday, August 8, 2017 9:31 AM

    I expected that each row would in or around 19 bytes long. Instead, each...

    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: Expensive View help

    In cases where you do need a scalar function, for max efficiency, get rid of any local variables that are not absolutely required:


    CREATE FUNCTION [dbo].[ufn_GetPlannersName](@intFeasibilityRequestId...

    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: Index Usage Question

    The table definition could be adjusted for efficiency.

    At a minimum, get rid of the formatting chars in the phone# and make both it and zip char rather 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: What is the purpose of dropping temp db?

    As noted, the code should be retained for debugging uses, but it should be modified some.

    1) Be sure to add this statement before it:
    SET @DropTempDB = ''

    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 better join my queries and prevent usage of functions

    I'll give it a guess.  Typically now you use OUTER APPLY to do the type of lookup  you're trying to do.  You also definitely don't need to join the table...

    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,766 through 3,780 (of 7,613 total)