Dmitry Yemanov
0493422c9f
Better processing and optimization if IN <list> predicates ( #7707 )
...
* WIP
* Original (circa 2022) implementation of the IN LIST optimization, with some post-fixes and minor adjustments
* Make it possible to optimize IN <list> for middle segments in compund indices
* Avoid modifying the retrieval structure at runtime, it may be shared among concurrent requests
* Simplify the code a little. Better cost calculation. Support both root-based and sibling-based list scans inside the same plan node.
* Removed the unneeded const casts and other changed as suggested by Adriano
2023-09-04 09:13:10 +03:00
Adriano dos Santos Fernandes
670d3513ca
Improvement #7688 - Profiler should not miss query's top-level access paths nodes.
continuous-integration/drone/push Build is passing
2023-07-29 23:51:15 -03:00
Adriano dos Santos Fernandes
29b1d829b4
Rename methods related to cursor/recsrc ids, removing "profile" from them.
2023-07-26 08:02:11 -03:00
Adriano dos Santos Fernandes
e05d8f7d15
Fix #7553 - Firebird 5 profiler error with subselects.
continuous-integration/drone/push Build encountered an error
2023-04-26 20:03:14 -03:00
Dmitry Yemanov
1c2470c4cc
Adjustments as per Adriano's comments
2023-01-04 12:08:11 +03:00
Dmitry Yemanov
36d011f731
Prettier plan output: distinguish between main queries and sub-queries, show cursor names/options, report line numbers
2023-01-02 13:40:29 +03:00
Adriano dos Santos Fernandes
5cc8a8f7fd
SKIP LOCKED clause for SELECT WITH LOCK, UPDATE and DELETE ( #7350 )
...
* SKIP LOCKED clause for SELECT WITH LOCK, UPDATE and DELETE.
* Misc.
* Change as Dmitry suggested and fix Windows build.
* Change order of LOCK to between SKIP and FIRST.
* Avoid refetch with READ COMMITTED transaction as suggested by Dmitry.
* Revert changes to TRA_wait and use tra_probe in vio/prepare_update
when skipping locked.
* Add to CHANGELOG.
2022-10-28 07:09:01 -03:00
Adriano dos Santos Fernandes
98f678d4ee
Rename class jrd_req to Request.
2022-02-13 10:51:30 -03:00
Dmitry Yemanov
19f2bfdd01
Refactored the optimizer. Better debug logging.
2022-02-09 10:20:16 +03:00
Dmitry Yemanov
ed0eb94ae9
Restore simpler signature for node methods
2021-10-12 20:17:17 +03:00
Adriano dos Santos Fernandes
24581bb7fe
Fix #6875 - Significant performance regression of SIMILAR TO and SUBSTRING(SIMILAR)
...
when pattern is taken from variable (rather than directly specified).
2021-07-02 11:22:59 -03:00
Adriano dos Santos Fernandes
8781146319
Fix #6854 - Crash occurs when use SIMILAR TO and compare string with pattern
...
that contains non-ascii character with suppressed exception handling
(or "Invalid SIMILAR TO pattern" raises otherwise).
2021-06-14 15:08:34 -03:00
Dmitry Yemanov
9f86d1ad4e
Ensure the cursor is closed after error
2020-11-04 09:35:21 +03:00
Dmitry Yemanov
d50aa0918d
Refactored PSQL savepoint envelopes. Made the savepoint undo logic consistent across the codebase. Added assertions to prevent releasing the savepoint that must be undone.
2020-09-25 11:15:31 +03:00
Dmitry Yemanov
82b2b2188e
Refactored the code backing DBKEY concatenation for views. Re-attempted to fix CORE-4985: Non-privileged user can implicitly count records in a restricted table.
2020-06-15 19:25:35 +03:00
Adriano dos Santos Fernandes
1951362a73
Improve allocation of request impure space, specially statements, to not waste alignment space (CORE-6330).
2020-06-11 14:28:11 -03:00
Adriano dos Santos Fernandes
734bca7a4f
Improve statement memory consumption removing the type from the nodes, adding as virtual method to the vtable.
2020-06-07 21:58:31 -03:00
Adriano dos Santos Fernandes
7806ad34df
Use std::initializer_list in RegisterNode to avoid multiple variable registration for each node.
2020-06-05 13:57:46 -03:00
Adriano dos Santos Fernandes
28e18749ff
WIP: Reimplementation of SIMILAR TO and SUBSTRING...SIMILAR using Google's re2 library.
...
This should fix:
CORE-4874
CORE-5664
CORE-3858
CORE-6088
CORE-3773
CORE-5931
CORE-6088
CORE-4893
2019-08-10 22:39:19 -03:00
Adriano dos Santos Fernandes
45d5e3aa7a
Refactor public include files ( #205 )
...
Refactor include files.
2019-06-03 11:45:00 -03:00
Dmitry Yemanov
4534a64791
Frontported and refactored PR #202 (CORE-5074)
2019-05-23 18:55:06 +03:00
Adriano dos Santos Fernandes
e438bdeb60
Fixed CORE-6033 - SUBSTRING(CURRENT_TIMESTAMP) does not work.
2019-03-22 12:45:06 -03:00
Dmitry Yemanov
8bb1ea9522
This workaround should fix MSVC12 build issues (ambiguous call to overloaded function for std::function and SomeNode* overloads)
2018-11-28 13:52:18 +03:00
Adriano dos Santos Fernandes
4ce50c0503
Fix CORE-5395 - Invalid data type for negation (minus operator).
2018-11-25 10:45:52 -02:00
Adriano dos Santos Fernandes
c5f8e6ca46
Avoid calls to JRD_get_thread_data.
2017-11-26 18:58:25 -02:00
Adriano dos Santos Fernandes
63a03dfc8f
Remove pool reference and children lists in each node.
...
Children lists will be created and destroyed on demand.
2017-11-26 18:58:25 -02:00
Adriano dos Santos Fernandes
d8fea3ec91
Avoid method calls in NULL objects.
...
It's undefined behavior even with non-virtual methods not accessing *this.
2017-06-09 17:10:46 +00:00
028248b194
Merged changes from master branch
2017-02-16 17:56:23 +03:00
Dmitry Yemanov
4f7843d5b5
Bugfix CORE-5414: Error restoring on FB 3.0 from FB 2.5: bugcheck 221 (cannot remap)
2017-01-05 21:32:44 +03:00
5aede150e3
Decimal floating point numbers - first draft
2016-11-11 17:59:55 +03:00
Adriano dos Santos Fernandes
8a4b7e3b79
Fixed CORE-5367 - Regression: (boolean) parameters as search condition no longer allowed.
2016-10-04 11:50:43 -03:00
Dmitry Yemanov
118a78e6e6
Bugfix CORE-5236: IN/ANY/ALL predicates may cause sub-optimal (late
...
filtering) execution of joins.
2016-07-09 01:14:50 +03:00
Adriano dos Santos Fernandes
d7eb6fe4d0
Fixed CORE-5167 - Allow implicit conversion between boolean and string.
2016-04-04 14:49:44 -03:00
asfernandes
152b6bdc01
Fixed CORE-5130 - Compiler issues message about "invalid request BLR" when attempt to compile wrong DDL of view with both subquery and "WITH CHECK OPTION" in its DDL.
2016-03-09 18:45:38 +00:00
hvlad
2dc879afca
This should fix known issues with MERGE and stable cursor (see CORE-3362).
...
Thanks to Dmitry for idea
2016-02-25 09:20:01 +00:00
alexpeshkoff
139331c7e3
Enhanced memory leaks search - changed FB_NEW to FB_NEW_POOL,
...
plain new to FB_NEW, making allocated with it blocks tagged with file/line.
Make related code slightly better readable.
2015-10-12 14:26:00 +00:00
dimitr
7857160480
Misc.
2015-10-08 13:24:21 +00:00
asfernandes
ce80938834
Fixed possible similar problems to CORE-4497.
2015-09-01 15:55:10 +00:00
dimitr
fe24642bc2
Fixed invariants handling in independent subqueries (seems to be related to CORE-4497).
2015-08-31 15:11:06 +00:00
asfernandes
f9bc6e1736
Add code to print the parser/executable tree to XML for debugging purposes.
2015-06-05 18:26:36 +00:00
asfernandes
ba03a8c71e
1) Improvement CORE-4791 - Make INSERTING/UPDATING/DELETING reserved words to fix ambiguity with boolean expresions.
...
2) Fixed CORE-4735 - Expression 'where bool_field IS true | false' should also use index as 'where bool_field = true | false' (if such index exists).
2015-05-15 16:10:39 +00:00
skidder
7c743fc291
Fix build warnings
2014-07-17 18:48:46 +00:00
robocop
cadd8accc4
Implemented STEP for generators/sequences and took the opportunity to make the blrOp param const. Please rebuild the databases.
2014-04-09 02:28:38 +00:00
asfernandes
30b0b5227b
Misc.
2014-03-31 02:04:26 +00:00
hvlad
6ca0cbb78a
Additional patch for CORE-3362 : Cursors should ignore changes made by the same statement:
...
- fixed error when "NOT IN" expression is turned into (better optimized) equivalent expression:
new RseBoolNode's lost parentForNode member (required later to [not]set stable cursor savepoint)
- replaced pointer to outer ForNode (parentForNode) by boolean flag (ownSavepoint) - it simplifies cloning of nodes
2014-03-19 22:31:50 +00:00
robocop
ae8f6d6b8f
Misc.
2014-03-03 04:37:29 +00:00
robocop
10a253d613
Make comparisons return plain int (PVS-Studio).
2014-02-25 06:20:09 +00:00
asfernandes
3a87224281
Warnings and make Linux debug build compile.
2014-02-18 01:49:07 +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
d11d3be507
Sync'ed with v2.5 and fixed wrong stream comparison checks.
2013-07-07 16:11:28 +00:00