Monthly Archives: October 2010

Optimizing the Oracle Query Optimizer

20-Oct-10

The Oracle Query Optimizer does a great job in rewriting Queries. For example the nested subquery in SELECT C.cust_last_name, C.country_id FROM customers C WHERE EXISTS (SELECT 1 FROM sales S WHERE S.quantity_sold > 1000 AND S.cust_id = C.cust_id);SELECT C.cust_last_name, C.country_id FROM customers C WHERE EXISTS (SELECT 1 FROM sales S WHERE S.quantity_sold > 1000 and […]

Read the complete article »

Unicode substrings in Ruby 1.8.x

15-Oct-10

Here is how to get correct unicode substrings in Ruby 1.8.x require ‘jcode’ $KCODE = ‘u’   "öäüÖÄÜß".split(//)[4,2].join # ÄÜrequire ‘jcode’ $KCODE = ‘u’ "öäüÖÄÜß".split(//)[4,2].join # ÄÜ Don’t know, if this performes well… In case you have better ideas, please drop me a comment.

Read the complete article »