Forum Replies Created

Viewing 15 posts - 4,891 through 4,905 (of 5,841 total)

  • RE: The Reverse Optimization Challenge #1

    NOW we are starting to get somewhere! :w00t:

    alter function dbo.fn_totalprice (@orderid varchar(max))

    returns varchar(max)

    as

    BEGIN

    declare @result money

    select @result = sum(UnitPrice * Quantity) from [Order...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Re: Interpreting results for SET STATISTICS IO

    jlp3630 (11/10/2008)


    TheSQLGuru (11/10/2008)


    The query with the lowest IO requirement is the one with the lowest logical reads (unless there are LOB reads, in which case you also compare lob logical...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: The Reverse Optimization Challenge #1

    If you want a 'cursor', simply create a UDF that takes an OrderID and calculates the SUM in the output. I leave it to the inquisitive reader to implement...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: T-SQL Code Optimizers

    EdVassie (11/10/2008)


    .

    .

    .

    I guess the above is a long way of saying 'it depends'.

    No need to 'guess' there! That was indeed a LONG way of saying "it depends"!! 😀

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: The Reverse Optimization Challenge #1

    Gail, your index choices and join choices were 'too good'! 🙂 Try this one:

    SELECT CompanyName, OrderDate, ProductName, OD.UnitPrice, Quantity, SUM(OD.UnitPrice) over (partition by CompanyName, OrderDate, ProductName,...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Re: Interpreting results for SET STATISTICS IO

    The query with the lowest IO requirement is the one with the lowest logical reads (unless there are LOB reads, in which case you also compare lob logical reads).

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Further optimizing a production query

    >>but they want only the categories that have products,

    Doesn't that indicate the need for an EXISTS clause, not a direct join?? Exists would be orders of magnitude faster...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Checkpoint frequency: is it possible to configure at database level?

    Marios Philippopoulos (11/6/2008)[hr

    Thanks, I have a question on how to judge a SAN's performance (what to use as a baseline etc.), but perhaps this can be reserved for a separate...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Checkpoint frequency: is it possible to configure at database level?

    I must have missed the smiley that indicated you were joking. As for resources required, the main issue with that statement is that almost everyone simply uses SIZE as...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Defragmentation in 2005 vs 2000

    TRACEY (11/6/2008)


    Do you have it set on all your Databases ..(auto sync)...and i take it you never have to run this UPDATE STATISTICS ever..

    That is emphatically NOT correct. auto...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Checkpoint frequency: is it possible to configure at database level?

    Marios Philippopoulos (11/6/2008)


    Would all 1024 drives be 'seen' by the same SQL server instance and shared by all other SQL instances? How does that help with IO throughput? Isn't contention...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Checkpoint frequency: is it possible to configure at database level?

    Marios Philippopoulos (11/6/2008)


    TheSQLGuru (11/6/2008)


    Marios Philippopoulos (11/6/2008)


    How is SAN architecture in any way beneficial to SQL Server performance?

    1) Can you have 1024 drives direct attached effectively? You can do that...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Checkpoint frequency: is it possible to configure at database level?

    Marios Philippopoulos (11/6/2008)


    How is SAN architecture in any way beneficial to SQL Server performance?

    1) Can you have 1024 drives direct attached effectively? You can do that with a 3Par...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Optimization time takes too long.

    One other thing: did you verify that there are no other batch jobs, maintenance jobs (such as backups or checkdbs), etc running between 2330 and 0330?

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Optimization time takes too long.

    I agree with Jeff, 4 hrs to redo indexing on 65GB isn't unreasonable unless you have pretty good hardware.

    I would check out IO stalls (fn_virtualfilestats). Also, how...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 4,891 through 4,905 (of 5,841 total)