1. 31 8月, 1999 1 次提交
  2. 23 8月, 1999 1 次提交
    • T
      Further planner/optimizer cleanups. Move all set_tlist_references · 78114cd4
      Tom Lane 提交于
      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
  3. 21 8月, 1999 1 次提交
    • T
      Major revision of sort-node handling: push knowledge of query · db436adf
      Tom Lane 提交于
      sort order down into planner, instead of handling it only at the very top
      level of the planner.  This fixes many things.  An explicit sort is now
      avoided if there is a cheaper alternative (typically an indexscan) not
      only for ORDER BY, but also for the internal sort of GROUP BY.  It works
      even when there is no other reason (such as a WHERE condition) to consider
      the indexscan.  It works for indexes on functions.  It works for indexes
      on functions, backwards.  It's just so cool...
      
      CAUTION: I have changed the representation of SortClause nodes, therefore
      THIS UPDATE BREAKS STORED RULES.  You will need to initdb.
      db436adf
  4. 16 8月, 1999 1 次提交
    • T
      Major planner/optimizer revision: get rid of PathOrder node type, · e6381966
      Tom Lane 提交于
      store all ordering information in pathkeys lists (which are now lists of
      lists of PathKeyItem nodes, not just lists of lists of vars).  This was
      a big win --- the code is smaller and IMHO more understandable than it
      was, even though it handles more cases.  I believe the node changes will
      not force an initdb for anyone; planner nodes don't show up in stored
      rules.
      e6381966
  5. 15 8月, 1999 1 次提交
  6. 09 8月, 1999 1 次提交
    • B
      > > Prevent sorting if result is already sorted · 158fd5f1
      Bruce Momjian 提交于
      > >
      > > was implemented by Jan Wieck.
      > > His work is for ascending order cases.
      > >
      > > Here is a patch to prevent sorting also in descending
      > > order cases.
      > > Because I had already changed _bt_first() to position
      > > backward correctly before v6.5,this patch would work.
      > >
      Hiroshi Inoue
      Inoue@tpf.co.jp
      158fd5f1
  7. 29 7月, 1999 1 次提交
  8. 27 7月, 1999 1 次提交
    • T
      First cut at doing LIKE/regex indexing optimization in · 9e7e29e6
      Tom Lane 提交于
      optimizer rather than parser.  This has many advantages, such as not
      getting fooled by chance uses of operator names ~ and ~~ (the operators
      are identified by OID now), and not creating useless comparison operations
      in contexts where the comparisons will not actually be used as indexquals.
      The new code also recognizes exact-match LIKE and regex patterns, and
      produces an = indexqual instead of >= and <=.
      
      This change does NOT fix the problem with non-ASCII locales: the code
      still doesn't know how to generate an upper bound indexqual for non-ASCII
      collation order.  But it's no worse than before, just the same deficiency
      in a different place...
      
      Also, dike out loc_restrictinfo fields in Plan nodes.  These were doing
      nothing useful in the absence of 'expensive functions' optimization,
      and they took a considerable amount of processing to fill in.
      9e7e29e6
  9. 26 7月, 1999 1 次提交
    • T
      Remove 'restrictinfojoinid' field from RestrictInfo nodes. · 8ae29a1d
      Tom Lane 提交于
      The only place it was being used was as temporary storage in indxpath.c,
      and the logic was wrong: the same restrictinfo node could get chosen to
      carry the info for two different joins.  Right fix is to return a second
      list of unjoined-relids parallel to the list of clause groups.
      8ae29a1d
  10. 25 7月, 1999 1 次提交
    • T
      Clean up messy clause-selectivity code in clausesel.c; repair bug · ac4913a0
      Tom Lane 提交于
      identified by Hiroshi (incorrect cost attributed to OR clauses
      after multiple passes through set_rest_selec()).  I think the code
      was trying to allow selectivities of OR subclauses to be passed in
      from outside, but noplace was actually passing any useful data, and
      set_rest_selec() was passing wrong data.
      
      Restructure representation of "indexqual" in IndexPath nodes so that
      it is the same as for indxqual in completed IndexScan nodes: namely,
      a toplevel list with an entry for each pass of the index scan, having
      sublists that are implicitly-ANDed index qual conditions for that pass.
      You don't want to know what the old representation was :-(
      
      Improve documentation of OR-clause indexscan functions.
      
      Remove useless 'notclause' field from RestrictInfo nodes.  (This might
      force an initdb for anyone who has stored rules containing RestrictInfos,
      but I do not think that RestrictInfo ever appears in completed plans.)
      ac4913a0
  11. 19 7月, 1999 1 次提交
  12. 18 7月, 1999 1 次提交
  13. 16 7月, 1999 2 次提交
  14. 15 7月, 1999 1 次提交
  15. 14 7月, 1999 2 次提交
  16. 07 6月, 1999 1 次提交
  17. 26 5月, 1999 3 次提交
  18. 20 5月, 1999 1 次提交
  19. 19 5月, 1999 1 次提交
  20. 18 5月, 1999 1 次提交
  21. 12 5月, 1999 1 次提交
  22. 10 5月, 1999 1 次提交
  23. 27 4月, 1999 1 次提交
  24. 25 4月, 1999 1 次提交
  25. 19 4月, 1999 1 次提交
  26. 24 3月, 1999 1 次提交
  27. 03 3月, 1999 1 次提交
    • T
      Partial fix for copied-plan bugs reported by Hiroshi Inoue: · e0345e09
      Tom Lane 提交于
      _copyResult didn't copy subPlan structure completely.  _copyAgg is still
      busted, apparently because of changes from EXCEPT/INTERSECT patch
      (get_agg_tlist_references is no longer sufficient to find all aggregates).
      No time to look at that tonight, however.
      e0345e09
  28. 01 3月, 1999 1 次提交
    • T
      Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder, · b204d10c
      Tom Lane 提交于
      so remove them from MergeJoin node.  Hack together a partial
      solution for commuted mergejoin operators --- yesterday
      a mergejoin int4 = int8 would crash if the planner decided to
      commute it, today it works.  The planner's representation of
      mergejoins really needs a rewrite though.
      Also, further testing of mergejoin ops in opr_sanity regress test.
      b204d10c
  29. 23 2月, 1999 4 次提交
  30. 22 2月, 1999 3 次提交
  31. 21 2月, 1999 1 次提交