Commit Graph

5869 Commits

Author SHA1 Message Date
Tom Lane
8624ff7612 Further selectivity-estimation work. Speed up eqsel()
(it should just call the given operator, not look up an = operator).
Fix intltsel() so that all numeric data types are converted to double
before trying to estimate where the given comparison value is in the
known range of column values.  intltsel() still needs work, or replacement,
for non-numeric data types ... but for nonintegral numeric types it
should now be delivering reasonable estimates.
1999-08-02 02:05:41 +00:00
Marc G. Fournier
d35eebe748 back out last... 1999-08-02 01:42:57 +00:00
Marc G. Fournier
557ff53044 testing somethign... 1999-08-02 01:40:30 +00:00
Bruce Momjian
9032d3f205 autoconf 1999-08-01 16:36:57 +00:00
Bruce Momjian
b2a0a4e8f5 I didn't see any further discussion so here is, I hope, a clean fix to
configure.in to determine if a system is ELF or not.  Note that some
of the tests earlier may be redundant but I took the safest route.

D'Arcy J.M. Cain
1999-08-01 16:30:05 +00:00
Bruce Momjian
aa1bbed7da Update NT readme. 1999-08-01 14:48:50 +00:00
Tom Lane
44878506d8 First step in fixing selectivity-estimation code. eqsel and
neqsel now behave as per my suggestions in pghackers a few days ago.
selectivity for < > <= >= should work OK for integral types as well, but
still need work for nonintegral types.  Since these routines have never
actually executed before :-(, this may result in some significant changes
in the optimizer's choices of execution plans.  Let me know if you see
any serious misbehavior.
CAUTION: THESE CHANGES REQUIRE INITDB.  pg_statistic table has changed.
1999-08-01 04:54:25 +00:00
Tom Lane
f851c6b07d Add another ORDER BY to rules test; got tired of it 'failing'
every time I tweak the optimizer...
1999-08-01 04:41:32 +00:00
Tom Lane
970ef45c41 Re-enable pg_upgrade, after adding checks that the source
and target databases are of versions it knows about.
1999-07-31 22:06:44 +00:00
Tom Lane
d7f2c5580d Add some more verbiage to man page's directions for pg_upgrade. 1999-07-31 22:05:48 +00:00
Tom Lane
cf835f97fc Add comments for attdisbursion field --- NO code change. 1999-07-31 19:07:25 +00:00
Tom Lane
30da344cb1 Update comments about clause selectivity estimation. 1999-07-30 22:34:19 +00:00
Bruce Momjian
44763a2b23 Make usecatupd disabled for normal users, and allow normal users to
update temp tables with this setting.
1999-07-30 18:09:49 +00:00
Tom Lane
04578a9180 Further cleanups of indexqual processing: simplify control
logic in indxpath.c, avoid generation of redundant indexscan paths for the
same relation and index.
1999-07-30 04:07:25 +00:00
Marc G. Fournier
037cac7ca6 There is one section that changed, concernign startup...the rest is just
changes for v6.5->v6.5.1, so relatively harmless
1999-07-30 04:04:53 +00:00
Marc G. Fournier
63b70d3546 v6.6's HISTORY file should reflect changes that went into all previous
releases, including v6.5.1 ...
1999-07-30 03:58:20 +00:00
Marc G. Fournier
f08baacfa5 just testing a script... 1999-07-30 03:45:57 +00:00
Bruce Momjian
fca190e102 Remove extra #endif 1999-07-30 03:45:44 +00:00
Marc G. Fournier
5fb84df9b1 Nothing changed, just testing cvslog ... 1999-07-30 03:42:59 +00:00
Bruce Momjian
d41754cea2 Fix description of psql flags -t and -q. 1999-07-30 00:59:50 +00:00
Tom Lane
7d572886d6 Fix coredump seen when doing mergejoin between indexed tables,
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-30 00:56:17 +00:00
Tom Lane
161be69544 Update comments for create_indexscan_node(). 1999-07-30 00:44:23 +00:00
Bruce Momjian
12c51d9c6e Remove comment after optimization flag. 1999-07-29 15:39:05 +00:00
Tom Lane
ecbfafbe0e Add support for Case exprs to fix_indxqual_references,
so that Case works in WHERE join clauses.  Temporary patch --- this routine
is one of many that ought to be changed to use centralized expression-tree-
walking logic.
1999-07-29 02:48:05 +00:00
Tom Lane
6b157f376a Add equal() funcs for Case nodes ... amazing we had not
detected this omission before.  Miscellaneous other cleanups.
1999-07-29 02:45:36 +00:00
Bruce Momjian
a06fd1f316 Update TODO list. 1999-07-28 17:52:31 +00:00
Bruce Momjian
8bc25734a1 Update TODO list. 1999-07-28 17:51:41 +00:00
Tom Lane
9682e8081b Allow a_expr not just AexprConst in the right-hand list of
IN and NOT IN operators.  Rewrite grotty implementation of IN-list
parsing ... look Ma, no global variable ...
1999-07-28 17:39:38 +00:00
Bruce Momjian
bb68f6eaa6 Update TODO list. 1999-07-28 00:09:49 +00:00
Tom Lane
b62fdc13f0 Correct bug in best_innerjoin(): it should check all the
rels that the inner path needs to join to, but it was only checking for
the first one.  Failure could only have been observed with an OR-clause
that mentions 3 or more tables, and then only if the bogus path was
actually selected as cheapest ...
1999-07-27 06:23:12 +00:00
Tom Lane
2f30d5a34a My recent optimizer changes caused a different plan to
be picked for one of the complex joins in rules test ... leading to
a different output ordering ...
1999-07-27 03:53:54 +00:00
Tom Lane
9e7e29e6c9 First cut at doing LIKE/regex indexing optimization in
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-27 03:51:11 +00:00
Bruce Momjian
434df3fb7a Update TODO list. 1999-07-26 20:12:33 +00:00
Bruce Momjian
32a505e897 Update TODO list. 1999-07-26 15:28:32 +00:00
Tom Lane
49ed4dd779 Further work on planning of indexscans. Cleaned up interfaces
to index_selectivity so that it can be handed an indexqual clause list
rather than a bunch of assorted derivative data.
1999-07-25 23:07:26 +00:00
Tom Lane
8ae29a1d40 Remove 'restrictinfojoinid' field from RestrictInfo nodes.
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.
1999-07-25 17:53:27 +00:00
Tom Lane
ac4913a0dd Clean up messy clause-selectivity code in clausesel.c; repair bug
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-24 23:21:14 +00:00
Tom Lane
348bdbce79 Minor code beautification, extensive improvement of
comments.  This file was full of obsolete and just plain wrong
commentary...
1999-07-23 03:34:49 +00:00
Tom Lane
baac6f981e Exit cleanups I made yesterday caused pq_close() to be
invoked during exit from a standalone backend, leading to core dump.
This is the cause of the recently reported initdb-time crash :-(.
Sorry folks...
1999-07-23 03:00:10 +00:00
Bruce Momjian
66f66343f6 Alpha spinlock fix from Uncle George <gatgul@voicenet.com> 1999-07-22 18:30:08 +00:00
Thomas G. Lockhart
f2f43efbe1 Complete merge of all old man page information.
lisp.sgml is a placeholder for Eric Marsden's upcoming contribution.
catalogs.sgml is not yet marked up or integrated.
 It should perhaps become an appendix.
1999-07-22 15:11:05 +00:00
Thomas G. Lockhart
a27512e634 Complete merge of all old man page information.
ecpg reference page still needs formatting.
1999-07-22 15:09:15 +00:00
Tom Lane
2aa64f79f5 Plug several holes in backend's ability to cope with
unexpected loss of connection to frontend.
1999-07-22 02:40:07 +00:00
Bruce Momjian
991b82ee13 Update TODO list. 1999-07-20 23:05:50 +00:00
Bruce Momjian
a2b619a1f0 Update TODO list. 1999-07-20 21:43:18 +00:00
Bruce Momjian
7746a2db36 Update TODO list. 1999-07-20 17:24:36 +00:00
Bruce Momjian
f96babac12 While I was running some tests in psql, trying to figure out how to change
the query string to handle any length, I discovered that under certain
conditions, psql will core dump when handling long strings.  Thus, the
patch.  It was caused by a buffer overrun, probably not noticeable in a lot
of cases, but pretty noticeable in mine.

Problem was caused by the fact that the length check is only performed after
the check for a ; to get the end of the query and execute.

Cheers...

MikeA
1999-07-20 17:20:43 +00:00
Bruce Momjian
a2bb39c738 Update TODO list. 1999-07-20 17:16:25 +00:00
Bruce Momjian
c175de56dc Reverse out cache changes that are not ready yet. 1999-07-20 17:14:08 +00:00
Bruce Momjian
7944d501f4 Use -ieee alpha flag for gcc and egcs only. 1999-07-20 16:48:58 +00:00