summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/pathnode.c
AgeCommit message (Collapse)Author
2000-02-07Repair planning bugs caused by my misguided removal of restrictinfo linkTom Lane
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'.
2000-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-22Revise handling of index-type-specific indexscan cost estimation, perTom Lane
pghackers discussion of 5-Jan-2000. The amopselect and amopnpages estimators are gone, and in their place is a per-AM amcostestimate procedure (linked to from pg_am, not pg_amop).
2000-01-09Another round of planner/optimizer work. This is just restructuring andTom Lane
code cleanup; no major improvements yet. However, EXPLAIN does produce more intuitive outputs for nested loops with indexscans now...
1999-11-23Tid access method feature from Hiroshi Inoue, Inoue@tpf.co.jpBruce Momjian
1999-08-16Major planner/optimizer revision: get rid of PathOrder node type,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.
1999-08-06Revise generation of hashjoin paths: generate one path perTom Lane
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.
1999-07-30Update comments about clause selectivity estimation.Tom Lane
1999-07-30Further cleanups of indexqual processing: simplify controlTom Lane
logic in indxpath.c, avoid generation of redundant indexscan paths for the same relation and index.
1999-07-30Fix coredump seen when doing mergejoin between indexed tables,Tom Lane
for example in the regression test database, try select * from tenk1 t1, tenk1 t2 where t1.unique1 = t2.unique2; 6.5 has this same bug ...
1999-07-27First cut at doing LIKE/regex indexing optimization inTom 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.
1999-07-25Further work on planning of indexscans. Cleaned up interfacesTom Lane
to index_selectivity so that it can be handed an indexqual clause list rather than a bunch of assorted derivative data.
1999-07-24Clean up messy clause-selectivity code in clausesel.c; repair bugTom 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.)
1999-07-16Final cleanup.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-07-15Clean up #include in /include directory. Add scripts for checking includes.Bruce Momjian
1999-05-25Another pgindent run. Sorry folks.Bruce Momjian
1999-05-25pgindent run over code.Bruce Momjian
1999-02-21From: Tatsuo Ishii <t-ishii@sra.co.jp>Marc G. Fournier
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef NOT_USED" for current. I have tested these patches in that the postgres binaries are identical.
1999-02-20pathkeys fixesBruce Momjian
1999-02-20Update pathkeys comparison function.Bruce Momjian
1999-02-18Fix bushy plans. Cleanup.Bruce Momjian
1999-02-15Remove duplicate geqo functions, and more optimizer cleanupBruce Momjian
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1999-02-12JoinPath -> NestPath for nested loop.Bruce Momjian
1999-02-12Fix optimizer and make faster.Bruce Momjian
1999-02-12optimizer updateBruce Momjian
1999-02-11Optimizer cleanups.Bruce Momjian
1999-02-11Optimizer cleanup.Bruce Momjian
1999-02-11optimizer cleanupBruce Momjian
1999-02-11Optimizer cleanup.Bruce Momjian
1999-02-11More optimization.Bruce Momjian
1999-02-11More optimizer speedups.Bruce Momjian
1999-02-11optimizer cleanupBruce Momjian
1999-02-11Optimizer fix for samekeys() and cost fixes for longer optimizer keys.Bruce Momjian
1999-02-10Optmizer cleanupBruce Momjian
1999-02-10Rename Path.keys to Path.pathkeys. Too many 'keys' used for other things.Bruce Momjian
1999-02-09Major optimizer improvement for joining a large number of tables.Bruce Momjian
1999-02-08Optimizer cleanup.Bruce Momjian
1999-02-06Optimizer cleanup.Bruce Momjian
1999-02-04Update optimizer comments.Bruce Momjian
1999-02-04More optimizer renaming HInfo -> HashInfo.Bruce Momjian
1999-02-03Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian
1999-02-03Optimizer rename ClauseInfo -> RestrictInfo. Update optimizer README.Bruce Momjian
1999-02-02SET_ARGS cleanupBruce Momjian
1998-09-21Fix for AND/OR handling.Bruce Momjian
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-08-04MergeSort was sometimes called mergejoin and was confusing. NowBruce Momjian
it is now only mergejoin.