1. 18 Apr, 2000 1 commit
  2. 12 Apr, 2000 1 commit
  3. 09 Apr, 2000 1 commit
  4. 30 Mar, 2000 1 commit
  5. 22 Mar, 2000 1 commit
    • Tom Lane's avatar
      Repair logic flaw in cost estimator: cost_nestloop() was estimating CPU · 1d5e7a6f
      Tom Lane authored
      costs using the inner path's parent->rows count as the number of tuples
      processed per inner scan iteration.  This is wrong when we are using an
      inner indexscan with indexquals based on join clauses, because the rows
      count in a Relation node reflects the selectivity of the restriction
      clauses for that rel only.  Upshot was that if join clause was very
      selective, we'd drastically overestimate the true cost of the join.
      Fix is to calculate correct output-rows estimate for an inner indexscan
      when the IndexPath node is created and save it in the path node.
      Change of path node doesn't require initdb, since path nodes don't
      appear in saved rules.
      1d5e7a6f
  6. 14 Mar, 2000 1 commit
  7. 15 Feb, 2000 1 commit
    • Tom Lane's avatar
      New cost model for planning, incorporating a penalty for random page · b1577a7c
      Tom Lane authored
      accesses versus sequential accesses, a (very crude) estimate of the
      effects of caching on random page accesses, and cost to evaluate WHERE-
      clause expressions.  Export critical parameters for this model as SET
      variables.  Also, create SET variables for the planner's enable flags
      (enable_seqscan, enable_indexscan, etc) so that these can be controlled
      more conveniently than via PGOPTIONS.
      
      Planner now estimates both startup cost (cost before retrieving
      first tuple) and total cost of each path, so it can optimize queries
      with LIMIT on a reasonable basis by interpolating between these costs.
      Same facility is a win for EXISTS(...) subqueries and some other cases.
      
      Redesign pathkey representation to achieve a major speedup in planning
      (I saw as much as 5X on a 10-way join); also minor changes in planner
      to reduce memory consumption by recycling discarded Path nodes and
      not constructing unnecessary lists.
      
      Minor cleanups to display more-plausible costs in some cases in
      EXPLAIN output.
      
      Initdb forced by change in interface to index cost estimation
      functions.
      b1577a7c
  8. 07 Feb, 2000 1 commit
    • Tom Lane's avatar
      Repair planning bugs caused by my misguided removal of restrictinfo link · d8733ce6
      Tom Lane authored
      fields in JoinPaths --- turns out that we do need that after all :-(.
      Also, rearrange planner so that only one RelOptInfo is created for a
      particular set of joined base relations, no matter how many different
      subsets of relations it can be created from.  This saves memory and
      processing time compared to the old method of making a bunch of RelOptInfos
      and then removing the duplicates.  Clean up the jointree iteration logic;
      not sure if it's better, but I sure find it more readable and plausible
      now, particularly for the case of 'bushy plans'.
      d8733ce6
  9. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  10. 23 Jan, 2000 1 commit
  11. 22 Jan, 2000 1 commit
  12. 09 Jan, 2000 1 commit
  13. 23 Nov, 1999 1 commit
  14. 22 Aug, 1999 1 commit
    • Tom Lane's avatar
      Further planner/optimizer cleanups. Move all set_tlist_references · 78114cd4
      Tom Lane authored
      and fix_opids processing to a single recursive pass over the plan tree
      executed at the very tail end of planning, rather than haphazardly here
      and there at different places.  Now that tlist Vars do not get modified
      until the very end, it's possible to get rid of the klugy var_equal and
      match_varid partial-matching routines, and just use plain equal()
      throughout the optimizer.  This is a step towards allowing merge and
      hash joins to be done on expressions instead of only Vars ...
      78114cd4
  15. 06 Aug, 1999 1 commit
    • Tom Lane's avatar
      Revise generation of hashjoin paths: generate one path per · e1fad50a
      Tom Lane authored
      hashjoinable clause, not one path for a randomly-chosen element of each
      set of clauses with the same join operator.  That is, if you wrote
         SELECT ... WHERE t1.f1 = t2.f2 and t1.f3 = t2.f4,
      and both '=' ops were the same opcode (say, all four fields are int4),
      then the system would either consider hashing on f1=f2 or on f3=f4,
      but it would *not* consider both possibilities.  Boo hiss.
      Also, revise estimation of hashjoin costs to include a penalty when the
      inner join var has a high disbursion --- ie, the most common value is
      pretty common.  This tends to lead to badly skewed hash bucket occupancy
      and way more comparisons than you'd expect on average.
      I imagine that the cost calculation still needs tweaking, but at least
      it generates a more reasonable plan than before on George Young's example.
      e1fad50a
  16. 16 Jul, 1999 1 commit
  17. 15 Jul, 1999 1 commit
  18. 07 Jul, 1999 3 commits
  19. 25 May, 1999 2 commits
  20. 01 May, 1999 1 commit
  21. 30 Apr, 1999 1 commit
  22. 05 Apr, 1999 1 commit
  23. 15 Feb, 1999 1 commit
  24. 13 Feb, 1999 1 commit
  25. 12 Feb, 1999 2 commits
  26. 10 Feb, 1999 2 commits
  27. 09 Feb, 1999 1 commit
  28. 03 Feb, 1999 1 commit
  29. 01 Sep, 1998 2 commits
  30. 04 Aug, 1998 1 commit
  31. 18 Jul, 1998 1 commit
  32. 15 Jun, 1998 1 commit
  33. 13 Jan, 1998 1 commit
    • Marc G. Fournier's avatar
      Some *very* major changes by darrenk@insightdist.com (Darren King) · 374bb5d2
      Marc G. Fournier authored
      ==========================================
      What follows is a set of diffs that cleans up the usage of BLCKSZ.
      
      As a side effect, the person compiling the code can change the
      value of BLCKSZ _at_their_own_risk_.  By that, I mean that I've
      tried it here at 4096 and 16384 with no ill-effects.  A value
      of 4096 _shouldn't_ affect much as far as the kernel/file system
      goes, but making it bigger than 8192 can have severe consequences
      if you don't know what you're doing.  16394 worked for me, _BUT_
      when I went to 32768 and did an initdb, the SCSI driver broke and
      the partition that I was running under went to hell in a hand
      basket. Had to reboot and do a good bit of fsck'ing to fix things up.
      
      The patch can be safely applied though.  Just leave BLCKSZ = 8192
      and everything is as before.  It basically only cleans up all of the
      references to BLCKSZ in the code.
      
      If this patch is applied, a comment in the config.h file though above
      the BLCKSZ define with warning about monkeying around with it would
      be a good idea.
      
      Darren  darrenk@insightdist.com
      
      (Also cleans up some of the #includes in files referencing BLCKSZ.)
      ==========================================
      374bb5d2
  34. 08 Sep, 1997 1 commit