Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)

  • RE: Clustored indexes and the direction of the sort

    Not sure if I've understood your scenario, so here goes...

    Have you got an ascending ID (e.g. an identity field or date column) and you are adding records in ascending order?...

  • RE: Flexible filters - can XML be used to avoid lots of "or xxxx IS NULL"?

    Thanks for the suggestions - it may be I'm ruling out dynamic SQL unnecessarily and I'll look into it. Not sure what is meant by name-value pairs?

    As for examples, think...

  • RE: What’s In Your (Junk) Drawers?

    When one colleague left we found, along with the usual selection of pens and stuff, some crackers and a range of individually wrapped cheese portions.

    Unfortunately it took us a while...

  • RE: Any valid reason to use a unique column in composite index?

    One possible use of an index on (RID, Col2, Col3) would be as a covering index for some query - if your table's columns are RID, Col2, Col3, BigVarcharCol4, BigVarcharCol5,...

  • RE: Database Diagram printing problems

    My work-around is,

    Zoom to 100%

    right-click on the diagram

    select "Copy Diagram to Clipboard"

    Paste into MS Word or similar

    Print it from there.

    If the diagram needs to span multiple pages I've also tried...

  • RE: Query plan confusion

    One other possible reason for the difference in plans - the two queries are not equivalent

    select max(run_id) from T_BIR_RUN

    always returns a single row.

    select run_id from T_BIR_RUN where run_id = (select...

  • RE: Querying a large table with an odd criteria

    A few thoughts:

    You are using table variables. Is it possible to use temporary tables instead? I think (but can't remember where I read it) the optimiser will assume the table...

  • RE: Select query taking time

    One thing that might be worth trying, but it kinda depends on how big a number @DataSet is (I'm guessing it is 10,000 based on the Filter operator).

    You appear to...

  • RE: Hacking Data

    Adding code to a popular MP3 song could infect millions of people

    I've heard of viruses jumping between species, but a virus spreading from machines to people? Or maybe it will...

  • RE: Data conversion

    I was so convinced the extra comma in the CREATE TABLE would cause an error, I never even noticed the date of the 2nd of Chequary (Chequary is the month...

  • RE: Can this query be written more efficiently ?

    I've always wanted to be able to say this:

    It depends.

    One alternative is to use ROW_NUMBER() to pick out the row with the max FirstTime - sample code below. Sometimes it...

  • RE: COALESCE Vs ISNULL

    OK, I'm happy with the explanation of why COALESCE fails, but why does ISNULL work? vk-kirov observed that ISNULL(NULL,NULL) appears to be a NULL of type INT, but it doesn't...

  • RE: Bundle/Group data elements linked in M-M table

    I've slightly modified your code for sample data to remove NULLs and add a PK, just for personal preference really. Also I've only dealt with producing the bundles, not any...

  • RE: sys.dm_db_index_usage_stats [Maintenance Cost] = [Retrieval Usage]

    If you are using Enterprise edition, the optimiser will automatically consider using the indexes on an indexed view, but on other editions you need a WITH (NOEXPAND) hint. Also there's...

  • RE: Searching for Plans

    The problem is, what counts as "best"? Letting the optimiser work through all possible plans may well find one with a lower cost, but would it be quicker? It would...

Viewing 15 posts - 1 through 15 (of 22 total)