Forum Replies Created

Viewing 15 posts - 2,596 through 2,610 (of 2,617 total)

  • RE: The Numbers Table

    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    This is true, for a small number of rows. Your RBAR TVF will become ineffecient should requirements change and the...

  • RE: The Numbers Table

    Lynn Pettis (11/27/2008)


    jacroberts (11/27/2008)


    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    This is true, for a small number of rows. Your RBAR TVF will become ineffecient should requirements change and the number of rows...

  • RE: The Numbers Table

    timothyawiseman (11/27/2008)


    jacroberts (11/25/2008)


    timothyawiseman (11/24/2008)[hr

    >>The problem is that your example did not show a case where efficiency is not a concern.

    >>But, in your example you say there is no need to...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    Is it me or do you seem to be in the minority here?

    Minority here on SSC where people are a bit more educated about these things, but certainly...

  • RE: The Numbers Table

    peter (11/25/2008)


    jacroberts (11/25/2008)


    Adam Machanic (11/25/2008)


    Anyone can take any example and change it so it performance is important.

    You're absolutely right! Why do you suppose that it happens to be so...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    Anyone can take any example and change it so it performance is important.

    You're absolutely right! Why do you suppose that it happens to be so easy?

    Is it...

  • RE: The Numbers Table

    Adam Machanic (11/25/2008)


    If you have a daily report that is run in batch, with no user waiting at the end of a button for the result, it doesn't matter if...

  • RE: The Numbers Table

    timothyawiseman (11/24/2008)[hr

    >>The problem is that your example did not show a case where efficiency is not a concern.

    >>But, in your example you say there is no need to worry about...

  • RE: The Numbers Table

    timothyawiseman (11/24/2008)


    jacroberts (11/24/2008)


    Performance isn't always an issue as in my previous example.

    I agree with Jeff that performance should always be a concern. After all, you may eventually need that...

  • RE: The Numbers Table

    You could also create tables with different number bases e.g for binary:

    WITH Digits (i,s)

    AS

    (

    SELECT 0 AS [Value], '0' AS String UNION ALL SELECT 1, '1'...

  • RE: The Numbers Table

    Adam Machanic (11/24/2008)


    Joe Celko (11/24/2008)


    Here is another method, which uses a tale of digits and some math

    CREATE TABLE Sequence (seq INTEGER NOT NULL PRIMARY KEY);

    WITH Digits (i)

    AS

    (VALUES (0),...

  • RE: The Numbers Table

    Performance isn't always an issue as in my previous example.

  • RE: The Numbers Table

    It depends how much performance is an issue, for a lot of queries it is not. For example, if there is a daily report that runs in batch it would...

  • RE: The Numbers Table

    I'd consider using a table valued function instead that only returns the rows I'm interested in:

    e.g.:

    CREATE FUNCTION [dbo].[Nums]

    (

    @StartNum int,

    @EndNum int

    )

    RETURNS @table...

  • RE: T-SQL Code Optimizers

    Can you show use the before and after SQL so we can see how well it did?

Viewing 15 posts - 2,596 through 2,610 (of 2,617 total)