Hello, Jim I did not want to clutter mailboxes of those who are not interested at this weird problem. So, i pointed to the archived message that contains 2 tar.gz files (around 50 KB) with the two sets of queries (firebird and postgresql respectively), its results, explain analyze, pg configurations, firebird plan outputs, etc. Please, open the cited link and scroll to the end of message. You will find the 2 tar.gz files. http://archives.postgresql.org/pgsql-performance/2006-04/msg00558.php If you have some difficulty, I could send a private email containing the 2 files in order to not send the big email to the all list again. Many thanks. Andre Felipe Machado Em Sex, 2006-05-12 às 14:14 -0500, Jim C. Nasby escreveu: > On Fri, May 12, 2006 at 12:48:52PM -0200, andremachado wrote: > > Hello, > > continuing the saga, > > http://archives.postgresql.org/pgsql-performance/2006-04/msg00558.php , > > my coleague created a test database with fake data (see below). > > > > The above archived message contains the the timings of firebird and postgresql. > > The weird problem are the 2 queries that firebird executes in less than 2 > > seconds and postgresql took almost half hour to complete at 100% cpu. > > How about posting EXPLAIN ANALYZE for those two queries, as well as the > queries themselves?