1. 21 Apr, 2007 4 commits
    • Tom Lane's avatar
      Tweak make_inh_translation_lists() to check the common case wherein parent and · 925ca9d7
      Tom Lane authored
      child attnums are the same, before it grovels through each and every child
      column looking for a name match.  Saves some time in large inheritance trees,
      per example from Greg.
      925ca9d7
    • Tom Lane's avatar
      Improve the way in which CatalogCacheComputeHashValue combines multiple key · 402bd494
      Tom Lane authored
      values: don't throw away perfectly good hash bits, and increase the shift
      distances so as to provide more separation in the common case where some of
      the key values are small integers (and so their hashes are too, because
      hashfunc.c doesn't try all that hard).  This reduces the runtime of
      SearchCatCache by a factor of 4 in an example provided by Greg Stark,
      in which the planner spends a whole lot of time searching the two-key
      STATRELATT cache.  It seems unlikely to hurt in other cases, but maybe
      we could do even better?
      402bd494
    • Tom Lane's avatar
      Adjust pgstat_initstats() to avoid repeated searches of the TabStat arrays · 11da4c67
      Tom Lane authored
      when a relation is opened multiple times in the same transaction.  This is
      particularly useful for system catalogs, which we may heap_open or index_open
      many times in a transaction, and it doesn't really cost anything extra even
      if the rel is touched but once.  Motivated by study of an example from Greg
      Stark, in which pgstat_initstats() accounted for an unreasonably large
      fraction of the runtime.
      11da4c67
    • Tom Lane's avatar
      Tweak set_rel_width() to avoid redundant executions of getrelid(). · ca3d14f2
      Tom Lane authored
      In very large queries this accounts for a noticeable fraction of
      planning time.  Per an example from Greg Stark.
      ca3d14f2
  2. 20 Apr, 2007 7 commits
  3. 19 Apr, 2007 7 commits
  4. 18 Apr, 2007 9 commits
  5. 17 Apr, 2007 11 commits
    • Bruce Momjian's avatar
      Update TODO for plpgsql cursors: · f30a72dc
      Bruce Momjian authored
      < 		o -Add support for WITH HOLD and SCROLL cursors
      > 		o -Add support for SCROLL cursors
      > 		o Add support for WITH HOLD cursors
      f30a72dc
    • Tom Lane's avatar
    • Bruce Momjian's avatar
      Also done for PL/pgSQL: · 097a200d
      Bruce Momjian authored
      < 		o Add support for WITH HOLD and SCROLL cursors
      > 		o -Add support for WITH HOLD and SCROLL cursors
      097a200d
    • Bruce Momjian's avatar
      Done: · f672b875
      Bruce Momjian authored
      < 		o Add MOVE
      > 		o -Add MOVE
      f672b875
    • Bruce Momjian's avatar
      Add warning about TODO item: · e6facb3b
      Bruce Momjian authored
      <   Currently all schemas are owned by the super-user because they are
      <   copied from the template1 database.
      >   Currently all schemas are owned by the super-user because they are copied
      >   from the template1 database.  However, since all objects are inherited
      >   from the template database, it is not clear that setting schemas to the db
      >   owner is correct.
      e6facb3b
    • Tom Lane's avatar
      Don't assume rd_smgr stays open across all of a rewriteheap operation; · 4942ee65
      Tom Lane authored
      doing so can result in crash if an sinval reset occurs meanwhile.
      I believe this explains intermittent buildfarm failures in cluster test.
      4942ee65
    • Bruce Momjian's avatar
      Not easy, per Alvaro: · 6c2c6682
      Bruce Momjian authored
      < * %Set proper permissions on non-system schemas during db creation
      > * Set proper permissions on non-system schemas during db creation
      6c2c6682
    • Tom Lane's avatar
      Rewrite choose_bitmap_and() to make it more robust in the presence of · 2e824a8e
      Tom Lane authored
      competing alternatives for indexes to use in a bitmap scan.  The former
      coding took estimated selectivity as an overriding factor, causing it to
      sometimes choose indexes that were much slower to scan than ones with a
      slightly worse selectivity.  It was also too narrow-minded about which
      combinations of indexes to consider ANDing.  The rewrite makes it pay more
      attention to index scan cost than selectivity; this seems sane since it's
      impossible to have very bad selectivity with low cost, whereas the reverse
      isn't true.  Also, we now consider each index alone, as well as adding
      each index to an AND-group led by each prior index, for a total of about
      O(N^2) rather than O(N) combinations considered.  This makes the results
      much less dependent on the exact order in which the indexes are
      considered.  It's still a lot cheaper than an O(2^N) exhaustive search.
      A prefilter step eliminates all but the cheapest of those indexes using
      the same set of WHERE conditions, to keep the effective value of N down in
      scenarios where the DBA has created lots of partially-redundant indexes.
      2e824a8e
    • Tom Lane's avatar
    • Tom Lane's avatar
      And remove 'em again ... · a7664ca3
      Tom Lane authored
      a7664ca3
    • Tom Lane's avatar
  6. 16 Apr, 2007 2 commits