Markus Winand's Blog

Archive for the ‘Portability’ Category

Working for the Community: hatools 2.14

In Portability, Reliability on 2010-03-16 at 08:36

This post is about my current work on release 2.14 of my most beloved OSS project: hatools. Just some observations, objectives, rants and an advertisement.

Scope

My scope for this release was rather limited: implement -v switches to hatimerun and halockrun to make them more communicative.

Read the rest of this entry »

Oracle JDBC PreFetch Portability

In Portability on 2010-01-29 at 14:23

In a previous article about (network) latencies, I have presented the OracleStatement.setRowPrefetch() method to reduce round trips for SELECT statements. I must admit that I was a little bit wrong. Not in the essence; increasing the PreFetch size is still a great (read: simple) way to reduce latencies. However, there is a better approach to set the PreFetch size. Read the rest of this entry »

Pipelined Functions: Better Than DBMS_OUTPUT

In Portability on 2009-11-11 at 15:36

Every now and then I need some PL/SQL that prints something to the terminal. The traditional solution for this is DBMS_OUTPUT.PUT_LINE. If you used it before, you probably know that there are some obstacles:

  • Don’t forget to set serveroutput on
  • Don’t forget to set an appropriate buffer size (but there is still a absolute maximum)
  • Don’t wonder about missing blanks
  • No way to flush the output

In case you don’t know yet, the first three can be taken care of by issuing the following in SQL*Plus:

set serveroutput on size 1000000 format wrapped;

However, the absolute buffer size limit remains. The years have passed, and the limitations were accepted. Until I noticed that there is an alternative.