1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-09 08:01:34 +03:00
Files
mariadb/sql
unknown d51f96b167 MDEV-3900 Optimizer difference between MySQL and MariaDB with stored functions in WHERE clause of UPDATE or DELETE statements
Analysis
The reason for the less efficient plan was result of a prior design decision -
to limit the eveluation of constant expressions during optimization to only
non-expensive ones. With this approach all stored procedures were considered
expensive, and were not evaluated during optimization. As a result, SPs didn't
participate in range optimization, which resulted in a plan with table scan
rather than index range scan.

Solution
Instead of considering all SPs expensive, consider expensive only those SPs
that are non-deterministic. If an SP is deterministic, the optimizer will
checj if it is constant, and may eventually evaluate it during optimization.
2013-01-17 16:08:05 +02:00
..
2011-06-30 17:31:31 +02:00
2012-11-09 10:11:20 +02:00
2011-11-24 18:48:58 +02:00
2011-11-24 18:48:58 +02:00
2012-04-05 23:07:18 +02:00
2012-09-26 18:29:49 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-11-24 18:48:58 +02:00
2011-12-11 11:34:44 +02:00
2011-11-24 18:48:58 +02:00
2011-05-28 05:11:32 +03:00
2012-08-22 16:45:25 +02:00
2011-11-24 18:48:58 +02:00
2012-04-05 23:07:18 +02:00
2012-06-23 15:00:05 -07:00
2012-11-09 10:11:20 +02:00
2011-12-16 10:21:46 +04:00
2011-12-11 11:34:44 +02:00
2013-01-10 15:40:21 +01:00
2011-12-11 11:34:44 +02:00
2010-10-10 17:18:11 +03:00
2012-11-09 10:11:20 +02:00
2012-03-28 13:58:14 +03:00
2010-04-21 02:25:59 +02:00
2013-01-09 23:51:51 +01:00
2011-12-11 11:34:44 +02:00
2013-01-10 15:40:21 +01:00
2013-01-17 13:53:15 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2012-06-18 22:38:11 +04:00
2011-12-11 11:34:44 +02:00
2013-01-17 13:53:15 +02:00
2013-01-17 13:53:15 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2012-08-24 14:02:32 +02:00
2012-08-24 14:02:32 +02:00
2013-01-10 15:40:21 +01:00
2013-01-10 15:40:21 +01:00
2013-01-10 15:40:21 +01:00
2012-11-20 13:57:49 +01:00
2012-08-22 16:45:25 +02:00
2010-04-21 02:25:59 +02:00
2011-12-11 11:34:44 +02:00
2012-04-05 23:07:18 +02:00
2013-01-10 15:40:21 +01:00
2013-01-10 15:40:21 +01:00
2011-06-30 17:31:31 +02:00
2012-02-16 20:15:57 +04:00
2011-02-25 20:15:27 +02:00
2012-06-02 16:13:05 +04:00
2012-08-21 22:24:34 +04:00
2012-05-11 11:40:23 +03:00
2011-11-12 18:08:12 +01:00
2011-02-22 20:28:01 +02:00
2011-11-24 18:48:58 +02:00
2011-05-04 23:20:17 +05:00
2010-07-10 13:37:30 +03:00
2012-08-22 16:45:25 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-11-24 18:48:58 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2012-08-22 16:45:25 +02:00
2012-08-22 16:45:25 +02:00
2011-06-30 17:37:13 +02:00
2012-08-22 16:45:25 +02:00
2012-08-22 11:40:39 +02:00
2012-09-27 13:18:07 +05:00
2011-06-30 17:31:31 +02:00
2012-05-20 14:57:29 +02:00
2012-08-22 16:45:25 +02:00
2011-12-11 11:34:44 +02:00
2013-01-10 15:40:21 +01:00
2012-04-05 12:01:52 +02:00
2011-06-30 17:37:13 +02:00
2011-06-30 17:37:13 +02:00
2011-11-24 18:48:58 +02:00
2011-04-12 14:26:06 +02:00
2011-11-24 18:48:58 +02:00
2011-11-24 18:48:58 +02:00
2012-11-09 10:11:20 +02:00
2012-11-09 10:11:20 +02:00
2013-01-10 15:40:21 +01:00
2011-11-24 18:48:58 +02:00
2013-01-10 15:40:21 +01:00
2011-12-11 11:34:44 +02:00
2010-04-01 17:34:51 +03:00
2012-04-05 23:07:18 +02:00
2012-02-03 16:56:12 +02:00
2012-08-22 16:45:25 +02:00
2012-08-22 16:45:25 +02:00
2013-01-10 15:40:21 +01:00
2011-12-11 11:34:44 +02:00
2013-01-10 15:40:21 +01:00
2012-11-20 13:57:49 +01:00
2012-03-13 13:34:20 -07:00
2011-12-11 11:34:44 +02:00
2012-03-23 18:22:39 +02:00
2011-12-11 11:34:44 +02:00
2013-01-10 15:40:21 +01:00
2013-01-10 15:40:21 +01:00
2012-08-22 16:45:25 +02:00
2013-01-10 15:40:21 +01:00
2011-06-30 17:37:13 +02:00
2011-12-11 11:34:44 +02:00
2012-08-22 16:45:25 +02:00
2011-11-24 18:48:58 +02:00
2011-11-24 18:48:58 +02:00
2012-11-09 13:07:32 +02:00
2013-01-10 15:40:21 +01:00
2013-01-09 23:51:51 +01:00
2011-12-11 11:34:44 +02:00
2012-08-24 14:26:23 +02:00
2013-01-16 15:11:13 +02:00
2012-05-08 20:58:41 +03:00
2011-11-24 18:48:58 +02:00
2012-11-09 10:11:20 +02:00
2012-09-27 13:18:07 +05:00
2012-08-24 14:02:32 +02:00
2012-11-20 13:57:49 +01:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-11-24 18:48:58 +02:00
2012-08-25 09:15:57 +03:00
2012-11-20 13:57:49 +01:00
2011-06-30 17:37:13 +02:00
2011-12-11 11:34:44 +02:00
2012-12-05 21:06:00 +02:00
2012-11-20 13:57:49 +01:00
2011-11-24 18:48:58 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2011-12-11 11:34:44 +02:00
2012-06-23 15:00:05 -07:00
2012-06-23 15:00:05 -07:00