- 18 Apr, 2000 1 commit
-
-
Tom Lane authored
table for an average of NTUP_PER_BUCKET tuples/bucket, but cost_hashjoin was assuming a target load of one tuple/bucket. This was causing a noticeable underestimate of hashjoin costs.
-
- 12 Apr, 2000 1 commit
-
-
Bruce Momjian authored
-
- 09 Apr, 2000 1 commit
-
-
Tom Lane authored
-
- 30 Mar, 2000 1 commit
-
-
Tom Lane authored
to next integer. Previously, if selectivity was small, we could compute very tiny scan cost on the basis of estimating that only 0.001 tuple would be fetched, which is silly. This naturally led to some rather silly plans...
-
- 22 Mar, 2000 1 commit
-
-
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.
-
- 14 Mar, 2000 1 commit
-
-
Tom Lane authored
of tuples we are going to retrieve from a sub-SELECT. Must have been half asleep when I did this code the first time :-(
-
- 15 Feb, 2000 1 commit
-
-
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.
-
- 07 Feb, 2000 1 commit
-
-
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'.
-
- 26 Jan, 2000 1 commit
-
-
Bruce Momjian authored
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
-
- 23 Jan, 2000 1 commit
-
-
Tom Lane authored
selectivity estimation wasn't right. This is better...
-
- 22 Jan, 2000 1 commit
-
-
Tom Lane authored
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).
-
- 09 Jan, 2000 1 commit
-
-
Tom Lane authored
code cleanup; no major improvements yet. However, EXPLAIN does produce more intuitive outputs for nested loops with indexscans now...
-
- 23 Nov, 1999 1 commit
-
-
Bruce Momjian authored
-
- 22 Aug, 1999 1 commit
-
-
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 ...
-
- 06 Aug, 1999 1 commit
-
-
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.
-
- 16 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 15 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 07 Jul, 1999 3 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 25 May, 1999 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 01 May, 1999 1 commit
-
-
Tom Lane authored
the cost of reading the source data.
-
- 30 Apr, 1999 1 commit
-
-
Tom Lane authored
sometimes estimating an index scan of a table to be cheaper than a sequential scan of the same tuples...
-
- 05 Apr, 1999 1 commit
-
-
Tom Lane authored
2gig. Fix failure to reliably put the smaller relation on the inside of a hashjoin.
-
- 15 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 13 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 12 Feb, 1999 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 10 Feb, 1999 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 09 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 03 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 01 Sep, 1998 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 04 Aug, 1998 1 commit
-
-
Bruce Momjian authored
it is now only mergejoin.
-
- 18 Jul, 1998 1 commit
-
-
Bruce Momjian authored
-
- 15 Jun, 1998 1 commit
-
-
Bruce Momjian authored
-
- 13 Jan, 1998 1 commit
-
-
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.) ==========================================
-
- 08 Sep, 1997 1 commit
-
-
Bruce Momjian authored
-