Posted by Dave on 03/29/2010
I frequently find the need to have single quoted output when i generate dynamic SQL. It’s always a pain to remember the exact number of ticks needed to get the quoted output. Here is a reminder on how to do it: select ””||schemaname||’.'||tablename||”” from pg_tables 4 quotes when there’s no text, or 3 quotes on [...]
Posted by Dave on 03/16/2010
PostgreSQL, like many RDBMSs uses a cost based optimizer. CBOs rely on database “statistics” (number of rows, data distribution, etc.) to generate a good execution plan for any query that is sent to the engine. If you have bad statistics, then you potentially have bad query plans. So a query that should take 1 second [...]
Posted by Dave on 01/15/2010
A little while ago I posted about PostgreSQL clustering and I said that I was going to evaluate HA-JDBC as an option. The reason I wanted to use HA-JDBC is that I was looking for a no-coding required solution for seamless fail over. (Similar to Oracle RAC) for PostgreSQL. I’ll be using a Shared Disk [...]
Posted by Dave on 01/07/2010
pgfouine is a nice logfile analyzer for PostgreSQL written in php. I’m doing a trace on a very long running ETL process and the logfile generated is ~11GB. I’m running up against a 2GB barrier in php for fopen(). If you’ve got a 64bit machine and can recompile php with -D_FILE_OFFSET_BITS=64 then you’re good to [...]
Posted by Dave on 11/23/2009
Now that I’ve got my basic active/passive cluster setup using the shared disk Linux heartbeat method mentioned