8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-31 09:23:03 +01:00
Commit Graph

52 Commits

Author SHA1 Message Date
dimitr
46ef6561a4 Misc. 2011-01-16 08:42:42 +00:00
asfernandes
a3064848d6 Make ExprNodes and RecordSourceNodes reference others directly instead of via jrd_nod.
Store ValueExprNodes instead of jrd_nod in the metadata cache.
Make RecordSourceNode child of ExprNode as they share most operations.
Get rid of the JRD visitors in favor of direct calls.
Convert assignments statement lists created inside expressions to separate source and targets ValuesExprNodes.
2010-11-21 03:47:29 +00:00
asfernandes
5ee982afb9 Refactor blr_derived_expr 2010-11-07 22:12:14 +00:00
alexpeshkoff
83d6a2f88c Restored a lot of changes, rolled back by me unintentionally 2010-10-12 11:36:51 +00:00
alexpeshkoff
2dc25a44bb OSRI and new posix build 2010-10-12 08:02:57 +00:00
asfernandes
9b8171d5c1 1) Refactor nod_value_if.
2) Created ExprNode::expressionEqual method to replace a new big and ugly switch.
3) Make boolean referencers use BoolExprNode instead of jrd_nod, except nod_validate for now. This includes BinaryBoolNode and NotBoolNode working without jrd_nod references.
4) Rework in the impure allocation code (replace "csb_impure += ..." by CMP_impure calls).
2010-09-20 16:07:50 +00:00
asfernandes
c1b5abfdf2 1) Refactor all types of boolean nodes.
2) Remove the scratch from the nodes.
2010-09-17 03:15:32 +00:00
asfernandes
ada671c034 Refactor nod_index and nod_bit_* to InversionNode 2010-08-31 00:20:33 +00:00
asfernandes
8f857a6deb Refactor plan nodes to PlanNode 2010-08-29 20:20:19 +00:00
asfernandes
96f2829728 Refactor nod_map and nod_sort to type-safe MapNode and SortNode 2010-08-29 18:20:44 +00:00
asfernandes
48d83b8fef Refactor nod_rse, nod_relation, nod_procedure, nod_union, nod_aggregate and nod_window. 2010-08-24 03:25:01 +00:00
asfernandes
dadc0f560c Const correction for EVL, EXE and they subsystems. Adjustments to CMP and OPT. 2010-08-09 15:48:51 +00:00
dimitr
c65e55c9e6 Fixed CORE-1550: Unnecessary index scan happens when the same index is mapped to both WHERE and ORDER BY clauses. 2010-03-11 10:03:32 +00:00
dimitr
413f771766 Actually, the optimizer doesn't need an expression index request to operate.
Moreover, I have a feeling that calling EVL from OPT is a bad design.
2010-02-26 09:51:48 +00:00
dimitr
c7853fa9e1 Fixed CORE-1295: Bad optimization of queries with DB_KEY. 2010-02-19 20:25:56 +00:00
dimitr
7d7aef4228 Cleanup and refactoring in the optimizer (mostly related to rivers and sort/merge). 2010-01-13 11:46:16 +00:00
dimitr
11495a55fb Refactored the whole RSB stuff into classes. They're inside the /recsrc sub-directory now.
Fixed the layering for WITH LOCK and (partially) ANY/ALL predicates.
Cleaned up the outdated code that never worked (mapping DISTINCT to an index, some VMS remainings).
Wiped out a lot of the pre-ODS11 optimizer logic. Some minor adjustments there.
Re-implemented the full outer join from scratch. This resolves CORE-2678 (full outer join cannot use available indices).
Resolved CORE-2796: DB_KEY is always zero for external tables.
Implemented the core part of the scrollable PSQL cursors. Implementation is still incomplete, but ready for testing.
Some other changes I don't recall at the moment ;-)

WARNING! The engine may be unstable. Please email me about any issues found.
2009-12-09 18:45:44 +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