Forum Replies Created

Viewing 15 posts - 646 through 660 (of 8,416 total)

  • RE: To TOP or not to TOP?

    Matt Miller (#4) (5/18/2012)


    The 2012 functionality within the += operator IS in fact a concatenator (if you use it with string data types). As long as you don't particularly...

  • RE: Select ... into statement generates different schemas between SQL2000 vs SQL2008R2

    Ensure you are running a recent build of 2008 R2. There were bugs that could result in a column being marked as NOT NULL when in fact it was...

  • RE: To TOP or not to TOP?

    RBarryYoung (5/18/2012)


    In particular, any reference to 'dc.[definition]' seems to cause the problem, though strangely, ONLY when the last column is ordered first (causing the following CASE expression to not append...

  • RE: To TOP or not to TOP?

    RBarryYoung (5/18/2012)


    As to why "dc.[definition]" is having this effect? No idea at all.

    It is a MAX column. These are often handled differently internally (via pointers rather than copying)...

  • RE: To TOP or not to TOP?

    The query plan without the TOP happens to feature a Sort operator (node 0) after the Compute Scalar (node 1) that defines the expression of interest. In the execution...

  • RE: Generating n-Tuples with SQL

    Jeff Moden (5/18/2012)


    Paul, where did you get the information about what the logical reads are by table type?

    I wanted to give credit to the person that first wrote about this,...

  • RE: Use your own optimizer to tune your queries

    Gullimeel (5/18/2012)


    Sorry I did not ask question correctly. I forgot to ask is there a table or DMV where we could see this Memory Grant option for a given query.

    sys.dm_exec_query_memory_grants...

  • RE: Use your own optimizer to tune your queries

    The following paper will help you understand sorting internals. Please bear in mind that although the paper gives details that are very close to the SQL Server implementation, it...

  • RE: Use your own optimizer to tune your queries

    Gullimeel (5/18/2012)


    I have not demonstarted anything apart from the equality. You can use inequality or anything you want and use the same to get the number of rows from stats...

  • RE: Use your own optimizer to tune your queries

    Received via private message:

    Gullimeel (5/18/2012)Cost of Sorting


    When you run a query say select * from sales..salesOrderheader order by customerid asc. I could see that it does a table scan and...

  • RE: Use your own optimizer to tune your queries

    Gullimeel (5/18/2012)


    I have made my stats tables highly optimized as well.

    A user table can never be as optimized as the internal metadata caches. The optimizations I was referring to...

  • RE: Nested loop outer join question

    Grant Fritchey (5/18/2012)


    It's not on all systems. This works fine in Adventureworks...

    Here's an Adventure Works example, in case it is helpful:

    SELECT

    sod.SalesOrderID,

    th.TransactionID

    FROM Production.TransactionHistory...

  • RE: Nested loop outer join question

    john.p.lantz (5/17/2012)


    I've got a simple SQL...

    select * from table1 a

    join table2 bon a.id_rssd = b.id_rssd

    left...

  • RE: Use your own optimizer to tune your queries

    Gullimeel (5/17/2012)


    In this you will see that optimizer is reading indexstats, stats tables twice and read planguide as well. I am sure the overhead of these is more than my...

  • RE: Generating n-Tuples with SQL

    Jeff Moden (5/17/2012)


    Not so sure about that. I've beat the rCTE for this problem for CPU and absolutely smoked it for reads just by doing the "simple" conversion to...

Viewing 15 posts - 646 through 660 (of 8,416 total)