Forum Replies Created

Viewing 15 posts - 46 through 60 (of 98 total)

  • RE: Introduction to Indexes: Part 3 – The nonclustered index

    Doug Bishop (1/21/2011)


    Very good article. I do have a question. I am aware of SQL Server creating intersecting indexes when you have a query on multiple columns and each column...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: Introduction to Indexes: Part 3 – The nonclustered index

    GilaMonster (1/21/2011)


    the sqlist (1/21/2011)


    "Include columns are useful in that they are columns available in the index but not contributing to the size of the index key"

    ...

    Included columns do affect the...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: Introduction to Indexes: Part 3 – The nonclustered index

    "Include columns are useful in that they are columns available in the index but not contributing to the size of the index key"

    I don't think this is true. I worked...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: A Simple way of Automating Scripts

    yordan.georgiev (11/25/2010)


    Hi ,

    *** Don't just give the hungry man a fish, teach him how to catch it as well.

    In my opinion this is exactly what I did ; )...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: A Simple way of Automating Scripts

    @yordan.georgiev

    I checked your batch file on your blog but can you describe a little bit what and how is it doing?.

    Thanks.

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Jeff Moden (10/2/2009)


    the sqlist (10/2/2009)


    What is the purpose of set statistics time on inside the function?

    Displays CPU consumption and Duration.

    Yes, I am perfectly aware of that. My question was why...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Paul White (10/1/2009)

    go

    set statistics time on

    declare @bb int;

    select @bb = N from [dbo].[ufn_Tally2] (1, 10000000, 1)

    set statistics time off

    go

    set statistics time on

    declare @bb int;

    select top (10000000)

    ...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Jeff Moden (9/22/2009)

    Heh.... now I'm not sure how you are testing. Like I said before... Lynn's runs in under 6 seconds for a 10M gen... yours (after adding 1...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Jeff Moden (9/22/2009)

    I'm using SQL SERVER Profiler with the data produced by the queries routed to a temp table. Routing the output to the screen gives false readings because...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Jeff Moden (9/22/2009)

    Heh... the logic is simpler but it's still an eyefull, isn't it? 🙂

    The other problem with that method is performance. It takes more than a minute to...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    laughingskeptic (9/22/2009)


    One usualy does not need a tally table larger than the largest table. In which case the following works as a generator:

    declare @i bigint

    set @i = 0

    select @i=@i+1...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: The Dynamic Tally or Numbers Table

    Nice article but it has a problem: the function CAN'T be created (or it's code used) on SQL server 2000 because of the CTE approach and and row_number() function; beside...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: Moving Databases with the ALTER Command

    What hapens to the index files (NDF) if they exist?

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: Passing a Table to A Stored Procedure

    vikas_kalra (8/27/2009)


    Hello Jacob,

    Your article is very interesting, but this raised some questions in my mind.

    One can adopt this approach as long as the two procedures/ functions are in the...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

  • RE: A Simple way of Automating Scripts

    tpa (8/4/2009)


    Thanks for sharing the .bat code.

    For daily scripts deployment on multiple databases, I usually build a SQLCMD script in 2 steps:

    1. Copy the .sql file paths into a new...

    Don't just give the hungry man a fish, teach him how to catch it as well.

    the sqlist

Viewing 15 posts - 46 through 60 (of 98 total)