25 September 2013

Oracle In-Memory Database

One of the big announcements of Oracle Open World 2013 is the Oracle Database In-Memory option. By simply "flipping the switch" the application will run faster than ever before.
From my understanding flipping the switch is making changes to some (not sure which) initialisation parameters.

Secret Sauce

What is the big deal with Oracle In-Memmory Database? Well, it is fast - really, really fast. DRAM is faster than Flash, and Flash is faster than disks.
Another big deal is the dual format in which the data is stored. The data is stored in a columnar and row fashion, both in memory. This means that analytical type queries can be answered by the columnar storage while other type of queries can be resolved using the row storage. And yes, the optimizer is aware of columnar storage as well.
Oracle takes care of storing the data in both formats, this is done completely transparent. It is simultaneously active and transactionally consistent. The secret sauce is the dual format storage, this is what it really makes it fast.
The columnar format of the data is memory only, the row format is stored in memory and persisted on disk, just as it is nowadays. In order to take full advantage of this you don't need to learn anything else - from a developer point of view.
During DML the affected data is marked as stale (in memory) thereby limiting the overhead. You can pick and choose which tables, partitions, columns you want to have in columnar format.

How does it differ from TimesTen?

How does it difer from TimesTen? Good Question. TimesTen is also an in memory database which has been around for a number of years. TimesTen is a more specialized approach to solve a particular business problem. The Oracle Database In-Memory Option does not tackle a particular problem, it works for the database as a whole.


Oracle Database In-Memory Option press release

17 September 2013

Tree with Checkboxes - Pre-Select Data with JSON

After you have modified the standard APEX tree to a tree with checkboxes (see this blogpost) you will probably need to find a way to load data from the database and show the values previously checked by the user.
In this blogpost I will show you how to load the data from the database using an AJAX-call and check the appropriate checkboxes in the tree.
The method described here retrieves the data uses the APEX_UTIL.JSON_FROM_SQL procedure and an AJAX call. This method can be used for many more things besides populating a Tree with checkboxes :)