Query tuning and why Open Source rocks

I spent a couple hours looking into why the cc_users view performs so poorly on postgresql. I narrowed it down to something in the genetic query optimizer but had not really been able to figure out how to get it to go fast no matter how hard I tried. I asked for help on on irc at #postgresql which was not terribly productive but I wrote it all up, asked on the pgsql-performance mailing list, and had the answer in less than an hour from Tom Lane who is the guy responsible for the optimizer. It turns out I was sort of on the wrong track since it was not really the generic query optimizer rather it's that the runtime parameter GEQO_THRESHOLD is also used in a heuristic to decide when to flatten subselects or not, but the answer is the same as I came up with which is to increase GEQO_THRESHOLD.

It always seemed like a kind of cliche when people claimed that's how things happen with open source and given the signal to noise in a lot of places I was not terribly hopeful I was going to get a real solution but I did. Now I feel like I could be in some sort of testimonial commercial about open source. Certainly compared to trying to figure out why my oracle queries were so horrible this is a refreshing experience.

06:19 PM, 16 Dec 2002 by Jeff Davis Permalink | Comments (1)

XML

Archive

December 2002
S M T W T F S
3  4  5 
9  10  11  12  13  14 
15  16  17  18  19  20  21 
22  23  24  25  26  27  28 
29  30  31         
April 2005
March 2005
February 2005
June 2004
May 2004
April 2004
March 2004
February 2004
December 2003
November 2003
October 2003
September 2003
July 2003
June 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: I've seen an md5 collision!
  2. Ashok Argent-Katwala: Parents
  3. Jeff Davis: parent selectors...
  4. Ashok Argent-Katwala: Named anchors
  5. Jeff Davis: Works vs. head (5.2) for openacs
  6. Carl Robert Blesius: PostgreSQL 8.0 + OpenACS?
  7. Jeff Davis: Shockingly it is in fact "grout"
  8. Jade Rubick: So I wasn't the only one!
  9. Jarkko Laine: Contrast
  10. Ashok Argent-Katwala: Car