Hello all, I was puzzling today about our planner's apparently inability to properly use some of the views (e.g. record_attr, rec_descriptor). The hstore passthru step seems to be the most likely source of opacity, so I wondered if we might try to use crosstab() instead.
Here is a (fairly ugly) attempt to do so: http://pastebin.com/aEvqzXAc I have very little experience using crosstabs, so this can probably be tidied up somehow. That said, I see promising results on the test data (a sample query falls from ~50ms to ~1.5ms), but we need to try it on a production set to really see if it helps. Anyone care to try it out, or weigh in on this approach? A good test might be the "expert search" without Mike's latest patch, or perhaps just do some selects of rec_descriptor and see what happens. Thanks! Dan Daniel Wells Library Programmer/Analyst Hekman Library, Calvin College 616.526.7133
