8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-29 06:43:03 +01:00
Commit Graph

73 Commits

Author SHA1 Message Date
Adriano dos Santos Fernandes
a7948792b1 Warning. 2016-04-12 14:24:07 -03:00
Adriano dos Santos Fernandes
899e92c20c Misc. 2016-04-10 00:08:35 -03:00
Dmitry Yemanov
54cde2c6ec Rework solution for CORE-5146. 2016-04-07 15:38:07 +03:00
dimitr
b9178d4df1 Small refactoring. 2014-12-21 19:16:51 +00:00
dimitr
7d802db4f5 Avoid metadata lookups while retrieving the plan (especially important in ASTs). 2014-07-30 09:50:33 +00:00
skidder
7c743fc291 Fix build warnings 2014-07-17 18:48:46 +00:00
dimitr
3d9eb474f1 Moved the helper class to the public scope for reuse outside the optimizer. 2014-03-30 12:57:51 +00:00
asfernandes
2ba73f6fb2 Scope. 2014-03-16 18:46:57 +00:00
dimitr
15113ae2dd Resolved CORE-1482: Make optimizer to consider ORDER BY optimization when making decision about join order.
Also, improved (hopefully) cost calculation for navigational retrievals.
2014-01-05 19:40:07 +00:00
dimitr
74fbaf5ec1 Another solution for CORE-1550: Unnecessary index scan happens when the same index is mapped to both WHERE and ORDER BY clauses. It's intended to fix the reported issues.
Also resolved CORE-4285: Choose the best matching index for navigation.
2013-11-28 09:12:02 +00:00
dimitr
8ee2b22263 Fixed the optimization improvement accidentally broken by a recent commit. 2013-07-29 06:56:44 +00:00
dimitr
fec38d76b2 Slightly refactored the optimizer regarding navigational walks. 2013-06-30 17:33:02 +00:00
dimitr
b07ef45ae6 A few additional adjustments for CORE-1295: Bad optimization of queries with DB_KEY. 2012-11-27 17:22:42 +00:00
robocop
70d5ebdfdf - Got rid of the fixed array that kept the stream count in the first element and 255 streams after it.
- Changed streams from UCHAR to ULONG as Dmitry wanted
- Got rid of some redundant flags to indicate BLR level
- Misc changes (for example, converted to test for DBB_read_only in Database to a function)
- BLR v6 is left commented (waiting for a better solution to appear, if any exists)
- This change is not going to raise the engine limits until a solution is found to express more than 255 streams in BLR.
2012-04-12 09:02:13 +00:00
asfernandes
a62c4b17d3 Fixed CORE-2457 - UNICODE_CI internal gds software consistency check. 2012-01-24 00:16:50 +00:00
dimitr
993788f9bc Misc optimizer tuning. 2011-02-21 10:09:30 +00:00
dimitr
cc71f0835f Removed duplicated type declaration. 2011-02-20 15:34:08 +00:00
asfernandes
c916c09e42 Refactored out OPT_expression_equal while fixing checking of sameAs involving CASTs. Problem saw by Dmitry. 2011-02-12 18:11:43 +00:00
asfernandes
c7f7a763d1 Avoid casts. 2011-02-12 17:41:49 +00:00
dimitr
9bd051b3e7 Refactored expression equality to make it independent from the stream being optimized. 2011-02-12 14:01:36 +00:00
dimitr
bb1f7ad9a6 Implement CORE-3076: Better performance for (table.field = :param or :param = -1) in where clause. 2011-02-07 17:54:24 +00:00
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