dimitr
123415bc5e
Unfortunately, the only correct way to reference stream internals (e.g. get field descriptors) in node comparison routines is either to compare nodes along with their corresponding CSBs or to compare only nodes and handle streams outside. I'm favoring the latter approach. And no, remapping is a wrong solution either (trunk is to be reworked again in this regard, sigh). This fixes CORE-4139 at the cost of removed CAST vs FIELD comparison trick. Let's see whether somebody is going to be affected.
2013-07-07 15:11:06 +00:00
dimitr
bebc026b62
Backported CORE-1295: Bad optimization of queries with DB_KEY.
2012-11-27 17:37:14 +00:00
asfernandes
33b4780605
Backported fix for CORE-2457 - UNICODE_CI internal gds software consistency check.
2012-02-27 15:51:39 +00:00
dimitr
dbd1775fc1
Fixed CORE-3176: View with "subselect" column join table and not use index.
2011-02-20 13:25:14 +00:00
dimitr
5c3894ec04
Fixed CORE-3283: Bad plan with using LEFT OUTER JOIN in sub-select.
2010-12-20 07:05:21 +00:00
dimitr
5565e8ff4b
Correction for one of my past commits. Also, unified the code a bit.
2010-11-29 15:50:36 +00:00
dimitr
5f1d41a7f6
More complete solution for CORE-2822: Error "no current row for fetch operation" when subquery includes a non-trivial derived table.
...
It's also expected to fix CORE-3103: Select statement with more non indexed reads in version 2.5RC3 as in version 2.1.3.
Patch for trunk will follow a bit later.
2010-08-11 10:50:33 +00:00
dimitr
17b630c1fe
More optimizer adjustments + named constants instead of hardcoded numbers.
...
In particular, this commit should resolve the degraded restore performance.
2009-08-19 09:18:30 +00:00
dimitr
77dce5ac12
Fixed some issues with the optimizer, namely: (1) incorrect cost calculation for indexed retrievals in joins and (2) too pessimistic heuristics for indices with zero selectivity.
...
Also, I removed the restricition I put recently to address some issues reported in the tracker (it's no longer necessary).
2009-06-19 11:33:12 +00:00
robocop
66b1227b22
Unused params, some formatting, cleanup.
2009-05-01 17:21:36 +00:00
robocop
888000e21e
Unused function params.
2009-04-26 10:24:44 +00:00
robocop
a730fbf074
Get rid of more typedefs.
2009-04-03 10:07:55 +00:00
asfernandes
5c97a235e3
Misc
2008-12-24 00:32:49 +00:00
robocop
2fadc0e456
Style.
2008-12-22 09:00:05 +00:00
dimitr
a58aaafdf2
Fixed CORE-2132: Indexed retrieval cannot be chosen if a stored procedure is used inside the comparison predicate.
2008-10-19 12:05:36 +00:00
dimitr
ddb3e8f07c
An attempt to fix CORE-2078. This approach is hopefully a bit more clever than the pre-ODS11 one.
...
I'll be waiting for the customer's report before backporting into v2.0/v2.1.
2008-09-12 14:36:14 +00:00
robocop
35da5b0540
Paranoid compiler.
2008-09-12 11:25:31 +00:00
dimitr
9944112913
Misc.
2008-09-12 11:15:22 +00:00
dimitr
407a4741f8
Cleanup.
2008-09-12 09:19:32 +00:00
dimitr
aad133369c
Cleanup.
2008-09-12 08:48:47 +00:00
robocop
b4091ac9a6
Make them explicit.
2008-03-10 08:16:57 +00:00
robocop
4c3381ef6b
Style, constness and macro cleanup.
2008-02-03 10:41:44 +00:00
hvlad
7a0dc31863
Fixed mistake
2006-11-01 21:19:19 +00:00
hvlad
ece81ac260
Proper but more complex fix for CORE-904: new ODS11 optimizer used unnecessary huge amount of memory while processing IN list with large number of items.
...
Use Firebird::ObjectsArray instead of Firebird::Array and remove IndexScratchListHolder as unneeded
2006-08-26 12:12:30 +00:00
hvlad
b20aa92714
Common table expressions implementation
2006-08-01 20:37:58 +00:00
dimitr
e26bcb63db
Forward-ported optimizer selectivity adjustments.
2006-07-29 07:03:34 +00:00
robocop
df48977a4b
Disable the debug info for the optimizer in the public repository as it might produce release builds that create an output file with that information.
2006-01-17 07:39:12 +00:00
arnobrinkman
78dcb398ef
Fix bug with lower/upper -exlude flag for indexes
2006-01-15 13:19:05 +00:00
robocop
1ca7a582f9
EXPRESSION_INDICES code is considered stable and therefore there's no need to keep it protected by macros. Please do a full rebuild.
2006-01-14 07:00:44 +00:00
dimitr
88f5a0d05e
Fixed the issue related to non-indexed relationships (reported in fb-devel).
2005-12-19 13:59:03 +00:00
robocop
105cd42e21
Non-member functions that are used in other modules should have a prefix.
...
Created a couple of temporary vars for code simplification.
2005-11-06 01:56:03 +00:00
arnobrinkman
94e7337628
Use candidate cost for decision which candidate to use.
...
Stop using indexes when total cost is greater as the previous used total cost.
Fix excludeLower/exludeUpper problem with using more operators to the same field.
2005-11-05 14:50:01 +00:00
hvlad
15ac3a9f47
Fixed SF #223060
...
Slow processing of GREATER-THEN operator
2005-10-27 21:52:17 +00:00
robocop
132eedb7a6
Misc.
2005-08-12 08:05:53 +00:00
arnobrinkman
c3f9c5bebc
Some more cost based calculation. Fine-tunning will follow
2005-08-08 22:17:40 +00:00
alexpeshkoff
5729790ed6
1. Applied class MetaName
...
2. Small generic cleanup
2005-05-12 18:28:04 +00:00
dimitr
c01b84565a
Tuned reduce factors again.
2005-04-23 12:16:11 +00:00
dimitr
4410fb9f97
1) Fixed wrong index usage for nested loop joins (indexed relationship must be a requirement).
...
2) Better optimizaton for tables with zero selectivities.
3) Fixed wrong choice of index in the case of the same selectivity and number of indices.
4) Fixed wrong total selectivity calculated for compound non-equality comparisons.
5) Some constants tuning based on two weeks of the extreme testing.
Subject of Arno's review, although all my tests show much better results without any regressions.
2005-04-15 14:54:59 +00:00
arnobrinkman
bb3560eb92
cosmetic changes
2005-02-17 00:17:05 +00:00
robocop
5a951268ae
Don't know if gcc is going to accept the const member functions. There's a MemoryPool in the middle.
2005-02-14 06:05:57 +00:00
arnobrinkman
6f7813bf28
Remove some temp-code that was still left
2005-02-12 17:06:12 +00:00
arnobrinkman
283d7f0d8c
Add new optimizer logic for handling :
...
ODS11:
- segment-selectivity
- better support for IS NULL
- better support for STARTING WITH
- matching both OR and AND nodes to indexes
- pick better JOIN order based on cost rules
ODSx:
- Indexed order on OUTER JOIN queries
2005-02-10 22:54:17 +00:00