dimitr
6449c942e7
Implemented CORE-3332: Provide more detailed information about the query execution plan. Some details are still to be worked on.
2011-02-02 11:31:04 +00:00
dimitr
def057b0e2
Fixed a small regression caused by myself.
2011-01-19 05:47:11 +00:00
dimitr
46ef6561a4
Misc.
2011-01-16 08:42:42 +00:00
dimitr
46b8ec1e14
Fixed CORE-3302: Distinct aggregates return wrong (duplicated) data.
2011-01-07 11:32:45 +00:00
asfernandes
c9ec26c0c3
Feature CORE-726 - Boolean data type
2010-12-18 02:17:06 +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
4dea3a42a1
Remove dependency of jrd_nod in ExprNode
2010-11-14 22:31:42 +00:00
asfernandes
3eb252ec5f
Refactored DSQL nodes: nod_derived_field, nod_map, nod_dbkey and nod_rec_version.
...
Refactored JRD nodes: blr_field (JRD side only), blr_dbkey, blr_record_version and blr_stmt_expr.
2010-11-14 17:25:48 +00:00
asfernandes
5ee982afb9
Refactor blr_derived_expr
2010-11-07 22:12:14 +00:00
asfernandes
1d702dae81
Refactor blr_via, blr_from, blr_maximum, blr_minimum, blr_count, blr_average and blr_total
2010-11-07 02:18:58 +00:00
asfernandes
045c090a38
Misc
2010-11-06 18:56:46 +00:00
asfernandes
2b6106938e
Refactor variables
2010-11-02 17:05:01 +00:00
asfernandes
e65fd8fea8
1) Refactor CAST.
...
2) Fixed CORE-3204 - Constraint violation error of CAST is not raised inside views
2010-11-01 23:57:31 +00:00
asfernandes
8df9d960a8
Correction
2010-11-01 15:09:22 +00:00
asfernandes
3317eeeebc
Refactor literal values.
2010-10-24 00:26:00 +00:00
asfernandes
16ff0c51ce
Refactor NULL expression
2010-10-22 15:00:22 +00:00
asfernandes
2e0da292df
Refactor EXTRACT
2010-10-16 18:53:25 +00:00
asfernandes
2dcef5c7ce
Refactor *_LENGTH functions
2010-10-16 18:17:00 +00:00
asfernandes
aa78df6f91
Refactor SUBSTRING
2010-10-16 17:42:04 +00:00
alexpeshkoff
e05c1a825f
Moved some more .h-files to common from jrd as Vlad suggested
2010-10-13 10:39:52 +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
ac3c00d503
1) Refactored LOWER, UPPER and TRIM.
...
2) Fixed CORE-3174 - Expression index with TRIM may lead to incorrect indexed lookup
2010-10-09 18:39:45 +00:00
asfernandes
4d00fec2d6
Refactor parameters and GEN_ID.
2010-10-09 01:57:37 +00:00
robocop
98a2c6822d
Warnings.
2010-09-24 09:53:51 +00:00
robocop
25b691353e
Misc.
2010-09-23 09:53:50 +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
b7b63becf3
Refactor a number of expression nodes: nod_add, nod_divide, nod_multiply, nod_negate, nod_user_name, nod_subtract, nod_current_date, nod_current_time, nod_current_timestamp, nod_add2, nod_subtract2, nod_multiply2, nod_divide2, nod_current_role, nod_internal_info
2010-09-04 21:36:41 +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
dimitr
523120f717
Fixed CORE-2155: Join of SP with view or table may fail with 'No current record for fetch operation'.
2010-08-28 12:41:51 +00:00
asfernandes
53d7b386fa
Move dozen of parameters of virtual/overriden function to OptimizerBlk
2010-08-25 03:10:12 +00:00
asfernandes
7eb5bb0ae3
Misc
2010-08-25 01:35:33 +00:00
dimitr
a048813907
Refactored the rivers management a bit.
2010-08-24 17:49:23 +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
asfernandes
173b23109c
1) Better organization between request and statement. 2) Consts.
2010-08-05 15:55:49 +00:00
dimitr
da183a98ed
Reworked the SEC$USERS implementation so that no new physical table type and data access method would be required. More changes are likely to follow soon.
2010-07-13 12:31:35 +00:00
alexpeshkoff
88db8b2fbc
ODS change: made RDB$USERS system table, added virtual table SEC$USERS
2010-07-09 12:51:05 +00:00
asfernandes
ccd83436a1
Misc
2010-05-01 17:34:46 +00:00
robocop
9f687c39c4
Misc.
2010-04-29 05:13:03 +00:00
asfernandes
4763533669
Refactor jrd_req into JrdStatement (shared part) and jrd_req (execution of a statement).
...
Fixed some bugs found in the way.
2010-04-18 22:19:11 +00:00
dimitr
1e2edd445d
Reworked the rsb/cursor logic a bit. Now I don't think sub-queries should be cursors.
2010-04-15 16:10:51 +00:00
asfernandes
68b5c1df6f
Cleanup
2010-04-07 16:32:12 +00:00
dimitr
1c9adc5300
Cleanup.
2010-04-06 16:26:27 +00:00
asfernandes
fe9bf02848
Refactor user and system functions nodes
2010-04-05 18:43:11 +00:00
asfernandes
e079a8fb43
Fixed CORE-2893 - Expression in a subquery in WHERE is treated as invariant and produce incorrect results
2010-02-28 00:40:03 +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
asfernandes
af249fe61a
Misc
2010-02-19 01:40:05 +00:00
asfernandes
4ea773eb33
Rework in the visitor classes to remove ugly reinterpret_cast of PMFs. Hope that solve the warning reported by Claudio too.
2010-02-17 02:04:15 +00:00
dimitr
3aaa3d1e87
Fixed CORE-1089: Wrong ordering with views, distinct, left join and order by
...
and CORE-2871: Outer ORDER BY clause has no effect.
2010-02-16 14:45:23 +00:00
robocop
835750a54c
Misc.
2010-02-16 08:53:31 +00:00
asfernandes
c737d6a807
Create ExprNode class hierarchy.
...
Convert CONCATENATE and aggregate functions to it.
Fix some bugs:
- select sum(n) over (order by n2), sum(n) over (), n, n2 from x1;
- select (select 1 from x1 b where list(1, a.n) = 1) from x1 a;
2010-02-13 20:29:29 +00:00
dimitr
ce33f56150
Fixed the logic I have broken recently.
2010-02-03 08:34:34 +00:00
dimitr
71e4f9a2ff
Fixed the first part of CORE-2832: Optimizer fails applying stream-local predicates before merging.
...
This part is related to the merge/hash join algorithms.
2010-02-03 05:42:59 +00:00
robocop
1d87d749f0
Misc.
2010-01-26 08:20:27 +00:00
dimitr
ea4077c888
1) Extended hash joins to handle more than two streams at once.
...
2) Allowed the hash table size to be configurable at runtime.
2010-01-22 07:17:35 +00:00
dimitr
d35f6e316b
1) Simplify the explicit plan handling between the parser and the engine. It makes no sense to pass the join type as it's ignored internally.
...
2) Support hash joins in the plan output and in the parser. For the latter, it's just the syntax sugar, same as loop vs merge join (see above).
2010-01-19 09:25:29 +00:00
dimitr
e2aab75891
Fixed the optimizer in regard to the partitioned window functions.
2010-01-19 07:52:38 +00:00
asfernandes
7fbee2c76b
Feature OVER (PARTITION BY ...) clause for window functions
2010-01-18 21:37:47 +00:00
asfernandes
d26457bc6d
Remove a var. shadow
2010-01-18 13:38:36 +00:00
dimitr
e9a3f9e213
Misc.
2010-01-18 13:18:20 +00:00
dimitr
df53be29bf
Misc.
2010-01-18 11:39:34 +00:00
dimitr
4862999990
Cleanup. Hopefully valid this time ;-)
2010-01-15 11:36:42 +00:00
asfernandes
fc948e44a6
I believe the expression may produce wrong results depending on compiler optimizations
2010-01-14 16:45:13 +00:00
dimitr
2f28556820
Fixed CORE-1274 (Wrong results when PLAN MERGE is chosen and datatypes of the equality predicate arguments are different) and CORE-1752 (Results of a join with different collations depend on the execution plan).
2010-01-14 12:25:13 +00:00
dimitr
dfa7f00cf7
Trivial support for hash joins in the optimizer.
...
Currently they completely replace the merge joins (for debugging purposes).
2010-01-14 11:41:36 +00:00
dimitr
ef05207a8d
Misc.
2010-01-14 07:13:38 +00:00
dimitr
27ff3bf1df
Misc.
2010-01-13 11:46:54 +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
asfernandes
5277b99bcf
Misc
2010-01-12 14:21:30 +00:00
dimitr
6256cebc83
Misc.
2010-01-12 09:53:08 +00:00
dimitr
5f39df8d27
Allowed merge joins for IS NOT DISTINCT equalities.
2010-01-11 17:37:49 +00:00
dimitr
59ee638622
Fixed the sorting.
2010-01-06 14:16:21 +00:00
robocop
eb571b41eb
Warning.
2009-12-16 09:31:36 +00:00
asfernandes
b137cdfd80
Misc
2009-12-14 23:55:56 +00:00
dimitr
793bfb91dd
Simplification.
2009-12-14 16:01:06 +00:00
robocop
00c5d74904
Cleanup.
2009-12-13 13:49:43 +00:00
dimitr
bda5c179d1
Cleanup the unneeded routines.
2009-12-13 11:50:27 +00:00
robocop
546bf76a24
Unused functions, unused parameters, unused vars.
2009-12-13 11:07:05 +00:00
robocop
dae574f7f1
Misc, style and unused vars.
2009-12-13 10:41:53 +00:00
asfernandes
7c38226dfc
Misc
2009-12-12 21:02:01 +00:00
asfernandes
7b8ea84561
Sort maps refactor
2009-12-12 20:36:56 +00:00
asfernandes
008e1bdb59
Remove usage of plain array with count in [0] in the new classes
2009-12-12 19:00:43 +00:00
dimitr
8cbaa89e7e
Fixed the merge join algorithm. Thanks to Adriano.
2009-12-10 15:26:46 +00:00
dimitr
d09fba5ebd
Fixed (hopefully) CORE-2798: Incomplete plan output (lack of view names) when selecting from views containing procedures inside.
2009-12-10 14:47:52 +00:00
dimitr
4052e12065
Corrected the logic. Thanks to Adriano.
2009-12-10 10:13:22 +00:00
asfernandes
925bcc9cf6
Misc / warnings
2009-12-10 00:02:01 +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
asfernandes
7e04ec0ab5
Clean it per Claudio request
2009-11-27 14:39:48 +00:00
asfernandes
a3dd1d0482
Misc
2009-11-26 00:20:59 +00:00
robocop
579a456329
Style.
2009-11-25 08:38:52 +00:00
robocop
d6ceb87638
Cleanup.
2009-11-25 04:52:54 +00:00
robocop
75df0fc37d
Comments.
2009-11-25 03:58:43 +00:00
robocop
804ad6048a
Restrict us to ODS11 and ODS12 until the dust settles down.
2009-11-24 11:42:56 +00:00
robocop
1386adcf90
Style.
2009-11-16 08:06:31 +00:00
asfernandes
7e0f76e708
Misc
2009-11-02 14:42:27 +00:00