Archive | February, 2006

HTML DB becomes Oracle Application Express

HTML DB is a exellent tool for administrating Oracle Databases. Since Version 2.0 it is a really serious tool for even developing applications. Once you have seen how easy it is to generate a database per copy and paste some lines, let’s say from an Excel spreadsheet, you start to slowly figure what a useful tool it is.

Now, Oracle decided to rename it to “Oracle Application Express” which acutally quite suits what it really does. Since it is free just go ahead and grab a copy and install it now. Great tool and the price is right. And just in case you have missed, but there is also a free Oracle Database called Oracle Express available.

More about Oracle Application Express can be found here.

Comments { 0 }

Part two: How to increase the performance with ColdFusion and Oracle

In the first part of this post we discussed how one can increase the performance of ColdFusion and Oracle by tuning the Software and coding in a way that we don’t create an extra overhead. In this part we will look at the System level. Right now we will show some tweaks for Window Server 2003. Both Coldfusion and Oracle will benefit from these settings.

Thing to know upfront

  • For the start we should know that by default Windows Server 2003 is configured to be a Print and Filesharing Server. Thus the file cache has a higher priority then the kernel of the system.
  • The highest performance is always gained by  enough Ram and a very fast Hard Disk.
  • In general don’t overdue it with disk tools or alike.
  • If you have the possiblity use different machines for each application, meaning use a machine for the database and a different one for the web server.

Settings known to help increase performance

  • Create a sepearte “TEMP” and “TMP” directory and change the default paths within the “Enviroment Variables”.
  • Name your network adapter to someting else then the default installation.
  • Set to give the background services the highest priority.
  • Create a big enough pagefile (2.5 times your RAM).
  • Reduce any visual effects.
  • Turn off the screen saver.
  • Reduce file cache
  • Set “best performance for Network Services” within the Network Settings.

Oracle specific settings

  • Deactivate Write Caching for the Hard disk that contains the Oracle datafiles.
  • Best is to use different Disk drives for Oracle files then the system or any other application.
  • Use at least 4 GB of Ram for the machine that Oracle is running on.

If there are any more tweaks you know to work well please comment on them. Also if you happen to know any IIS tweak they are more then welcome.

Comments { 12 }

Part one: How to increase the performance with ColdFusion and Oracle

One of the most asked questions around the world is how to increase the performance of ColdFusion and Oracle. Here are some hints from our daily work.

  1. Always use <cfqueryparam> when quering the database. This has shown an immense overall increase in performance. If you use <cfqueryparam> then ColdFusion does not need to “find out” what you want to pass on to the SQL statement, because we are telling what the datatype is for the SQL statement.
  2. We have also read that Caching of the SQL statement with <cachedwithin> parameter should increase the SQL statements as well. The problem that we have encountered is that if we use the method above with a <cachedwithin> then ColdFusion reports an error saying that these two paramaters can not be used together.
  3. One of the major benefits with any good SQL database is to have it perform logics already within the database in the form of Stored Procedures. Thus use as much stored procedures as possible. As a matter of fact, ColdFusion has a own stored procedure call which you can use as <cfstoredproc>. So for example with a Oracle database you use this tag like: <cfstoredproc procedure=”schema.mysp” datasource=”thedatasource”>
  4. We dont know if this tip is related to performance but if you are using ColdFusion MX7 then use Components as much as possible. First of all, it is good programming and second it comes close to Object Oriented programming. So it wont hurt.
Comments { 1 }

The better alternative then BLOB – meet Intermedia

Many people think of storing images in a database as a complete overhead or even that the performance suffers. This might be very true for a database product that has no special image functions or performance issues with large objects stored within the database. Good news for every developer, meet Intermedia a part of Oracles Database offering…..

Oracle Intermedia
Intermedia is part of every Oracle Database (except Oracle’s Express Edition. Well, they had to make you go for your money…) and is the most overlooked part within Oracle. With Intermedia you can replace all you blob fields with a intermedia type (ordimage). When using a intermedia field the images will be stored within that field and also any metadata (XMP; IPTC; DICOM and EXIF) can be extracted and again stored as XMLTYPE fields (which then again can be indexed with OracleText).

Also every image that is stored with intermedia retains all image informations like height, width, imagesize, imagename and so on. Oracle did even go further and made all those Intermedia variables available within PL/SQL. With it we are able to retrieve the width of a image stored in the database as simple as:

SELECT i.image.getwidth()
FROM images i

(you have to alias the table or else it does not work)

But InterMedia can do more then just storing images. It is able store audio and video as well. Plus with the Oracle Application Server installed you will be able to stream all you images to your application (like we do with Razuna). Plus you will be able do some simple image manipulation with PL/SQL as well.

So, the next time you are planning on a database model, take a look at InterMedia. More information about InterMedia can be found at Oracle.

If you have any question or would like to see more, please feel free to leave comments.

Comments { 23 }