Generating an Explain Plan in DB2 9.7 for LUW

Mar 04 2012

Similar to Oracle’s EXPLAIN PLAN statement and MySQL’s EXPLAIN statement, DB2 provides an EXPLAIN PLAN statement which generates information about the access plan chosen for the specified statement. The information is then placed into explain tables for reference. However, there are times when you simply want to see the explain plan displayed in a hierarchical format with […]

Vector Graphics Processing in Java

Aug 02 2011

Most common computer images are stored as arrays of pixel data or raster graphics. Formats such as PNG, and JPEG are classic examples of this. Vector Graphics are stored as operations that are instead “code” for drawing the image on the fly. In this article we will explore using a few different open source libraries to convertEMF, Postscript […]

Lucene Query Syntax for SQL

Aug 02 2011

Lucene provides a rich query syntax allowing users to easily create simple queries and scale up to complex ones. A number of search back-ends are built on top of Lucene nowadays such as ElasticSearch and Solr. In this article we will explore using Lucene’s query syntax against relational databases. We used Groovy here, but it […]

Handling Date Parameters in Grails

Mar 28 2011

Grails generally makes it very easy to bind request parameters to domain objects or command objects with properties of varying types. For most request parameters, a simple call to a controller’s bindData() method is all you need to handle property binding and type conversion. Unfortunately, the default Date binder is very rigid and only handles […]

Highlight text using Lucene

Mar 06 2011

The following code illustrates how to use the Lucene highlighter to highlight text in any String.

This code will wrap matching values with a bold tag. Example usage is as follows: java -cp LuceneHighlighter http://site/index “words”