Get short, timely messages from Mark S. Rasmussen.

Twitter is a rich source of instantly updated information. It's easy to stay updated on an incredibly wide variety of topics. Join today and follow @improvedk.

Get updates via SMS by texting follow improvedk to 40404 in the United States
Codes for other countries

Two-way (sending and receiving) short codes:
Country Code For customers of
Australia
  • 0198089488 Telstra
Canada
  • 21212 (any)
United Kingdom
  • 86444 Vodafone, Orange, 3, O2
Indonesia
  • 89887 AXIS, 3, Telkomsel
Ireland
  • 51210 O2
India
  • 53000 Bharti Airtel, Videocon
Jordan
  • 90903 Zain
New Zealand
  • 8987 Vodafone, Telecom NZ
United States
  • 40404 (any)

improvedk

  1. @AdamMachanic Oh, and thanks by the way :)
  2. @AdamMachanic Sorry, I will try to reduce my usage. In this case it was truly agonizing though :)
  3. @AdamMachanic Would you agree in the conclusion in the last two paragraphs (no need to read rest)? bit.ly/KuGFQA
  4. @AdamMachanic Just tried adding to both, no change. Column is nullable on Z but not on X.
  5. @AdamMachanic Let me post the full query + stats on DBA so it's easier to show what I've got. 5 min.
  6. @AdamMachanic Makes sense yes - and Y is nullable on Z. However, I've got a WHERE Y IS NOT NULL predicate in the inner query though.
  7. @AdamMachanic a large row count discrepancy between the tables (500 vs 50 million). Y being the primary key of X. 2/2
  8. @AdamMachanic That does the trick! Interesting. So because there's no cardinality stats for Y, it assumes the worst, even with such 1/2
  9. @AdamMachanic That gives the exact same execution plan - probably being rewritten to the same internally. I'll post plans & query on DBA.
  10. @AdamMachanic And you can assume ~500 rows in X, about ~50 million in Z - thus those 500 scans of Z are somewhat expensive.
  11. @AdamMachanic Instead of doing a RBAR scan on Z for each row in X.
  12. @AdamMachanic Assume no indexes on Y in Z. A scan is required. I just don't see why it wouldn't create a worktable and use that temporarily.
  13. @improvedk And I of course meant a scan of Z, not Y. #sqlhelp
  14. DELETE FROM X WHERE Y NOT IN (SELECT Y FROM Z) <- Why does that cause a scan of Y for each row in X? Wouldn't a worktable do it? #sqlhelp
  15. @MladenPrajdic Just as you can package HTML/JS to a native app using PhoneGap, you can embed LUA in a native wrapper.
  16. @MladenPrajdic No, but LUA interpreters come as libraries that you can embed inside apps that run natively. Flame contained a LUA VM.
  17. @MladenPrajdic That's no different from SQL, JavaScript, Java, .NET, etc. It won't run natively but if you've got the environment, sure.
  18. @MladenPrajdic Didn't I tell you to stay away from shrooms?
  19. @tonyrogerson Ah, I see. May God Save the Queen :)
  20. @tonyrogerson Wait, it isn't?