Forum Replies Created

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

  • Reply To: Huge speed difference with clause "If exists"

    Out of curiosity, what if you tried a version that doesn't use "if exists".  Maybe something like this...

    declare @exists bit=0
    select top 1 @exists=1 From BotCBO.vwClovekStrings_PrZk Where ClovekString...
  • RE: Slow down a transaction

    I could, but there are other things stored along with the hash. Things like when the entry was created, updated, number of cache hits, etc. So I would...

  • RE: Filtering on CTE result

    Thanks Igor, however I was looking for a solution. I was able to put the results into a table first and then use that table, just like you...

  • RE: Ranges that have excluded ranges

    The previous solution works great on small ranges, however it doesn't handle larger datasets and ranges.

    For example if the records are changed to something like

    ...

  • RE: Ranges that have excluded ranges

    Not yet. That's what I'm doing right now. I'm executing different parts independently to help understand what you did. If you can break down how you solved it...

  • RE: Ranges that have excluded ranges

    WOW!!! That is fantastic!

    Thanks!

  • RE: Locking a non existent row

    I think there's a potential issue with that idea. The second session could see an item in the cache but the first session hasn't finished and written the result...

  • RE: Locking a non existent row

    True, that would solve the issue of the duplicate insert. But that also means the expensive part would need to be run twice. Since the first session...

  • RE: Identical SP calls from different SPIDs

    Right, that's my question. Why are there 2 processes (i.e. more than 1 SPIDs)?

    What's happening is a single web service call is turning into 2 identical SP calls (2...

  • RE: using between on string columns

    Thanks! I must have total spaced. I should have know why that was happening.

    I liked the idea with padding with spaces but if I tried to use

  • RE: NEWSEQUENTIALID() with EC2

    The type on the timestamp column is datetime2(2)

  • RE: Tricky pivot

    That's excellent!! Thanks!

  • RE: Tricky pivot

    Yes, I did take a look at those articles. What make this one more difficult is there are 4000 Codes and each Code could appear anywhere from Code1-Code20. ...

  • RE: Improve Between performance

    I'll give it a try...

    I just tried it and I got this error...

    Msg 8115, Level 16, State 2, Line 4

    Arithmetic overflow error converting expression to data type int.

    The statement has...

  • RE: Improve Between performance

    Wow, that did it. The query now takes about 1ms to complete. Nice!!

    Here are the results that you asked for...

    gridrows

    1810

    gridlowhighrows

    84040840484040000084050000037696

    84090840984090000084100000037366

    0010000037162

    99200992099200000099210000033111

    84110841184110000084120000031619

    98000980098000000098010000028291

    84400844084400000084410000028048

    84070840784070000084080000027147

    84060840684060000084070000026154

    98050980598050000098060000025176

    Thanks for the help!!

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