Forum Replies Created

Viewing 15 posts - 856 through 870 (of 8,416 total)

  • RE: Automatic truncate of varchar string

    jcb (1/31/2012)


    I need to ask...

    Changing the column from varchar(245) to varchar(max) is an option?

    VARCHAR(something <= 8000) would be better. MAX types prevent online index builds (before SQL Server 2012...

  • RE: Automatic truncate of varchar string

    GilaMonster (1/31/2012)


    jcb (1/31/2012)


    Can You rely on a trigger to safe truncate the data to the column?

    No, because types are checked before triggers fire.

    Yes, if you use a view 😉 ...

    CREATE...

  • RE: Understanding and Using APPLY (Part 2)

    b5535084 (1/31/2012)


    I can use that, for sure, but it changes nothing really. Similar I/O counts and CPU time actually goes up. I'm attaching the plans for the two...

  • RE: Understanding and Using APPLY (Part 2)

    peter-757102 (1/31/2012)


    I often wished for a ransomization (on/off) setting, that forces deliberately anti-ordered results and expression execution order to quickly identify hidden false assumptions in queries.

    Yeah. I doubt we...

  • RE: Understanding and Using APPLY (Part 2)

    peter-757102 (1/31/2012)


    I did check some on the net myself (long live Google)....and this is what I get from it:

    I guess another consideration might be what to use as the clustering...

  • RE: Understanding and Using APPLY (Part 2)

    b5535084 (1/31/2012)


    OK -- I get that now. So I added:

    where rn=1 (so it would be included)

    and removed the top 1, so I now looks like:

    select nco.*, nci.ORDER_ITEM_ID o2

    From...

  • RE: Understanding and Using APPLY (Part 2)

    peter-757102 (1/31/2012)


    Can you explain (or have a link that does a good job at it), why one would want to go that route over clustered storage in that scenario?

    Not offhand,...

  • RE: Understanding and Using APPLY (Part 2)

    b5535084 (1/31/2012)


    Thanks for the insights! I have a question about your comment about the rn doing nothing though. My hope was that it would force the windowing so...

  • RE: Understanding and Using APPLY (Part 2)

    peter-757102 (1/31/2012)


    I took a look at the plans and what confused me is the apparent lack of clustered indexes (i noticed table scans instead of clustered index scans)!

    The table names...

  • RE: Understanding and Using APPLY (Part 2)

    If those two queries produce identical results, it is just luck. Your original queries had (rn = 1) ordered by order_item_id ascending for the JOIN option (which would give...

  • RE: 2012 RC0 Evaluation Edition

    Koen Verbeeck (1/31/2012)


    I've downloaded SQL Server 2012 RC0 to play with and to prepare myself for a session I'm going to give in a month. During installation, set-up asked for...

  • RE: Computed Columns 1

    The criticism of the question's wording is just a little on the harsh side for my taste. After all, this is a one-point question with a 50/50 choice. ...

  • RE: Computed Columns 1

    Hugo Kornelis (1/31/2012)


    There are good reasons why the only way to reference another table is through a workaround that's complicated enough to fool SQL Server.

    I wish this feature did not...

  • RE: Materialized view in sql server

    karthikaug18 (1/31/2012)


    so if i am doing select * from (indexed_view) does it touches the base tables to retrieve the data.?

    It might do. In Developer and Enterprise Edition the optimizer...

  • RE: Re running of queries

    Divine Flame (1/31/2012)


    Get the book SQL Server Execution Plans by Grant Fritchey to learn about execution plans (available on this same site in books section).

    The free PDF is here: http://www.red-gate.com/our-company/about/book-store/assets/sql-server-execution-plans.pdf

    I...

Viewing 15 posts - 856 through 870 (of 8,416 total)