Optimizer table elimination suggestion

Asked by Nikolay Mihaylov on 2010-08-10

I believe it will be easy, if you implement following cases for optimizer table elimination:
-----------------------
create view v_xxx as

select
   id,
   (select first_name from users where id = products.user) as product
from
   products;
-----------------------

then user can do:

-----------------------
select id from v_xxx ;
-----------------------

this case is almost identical to left outher join you already implemented. You do not need to know "first_name" column. Is eighter set or is NULL.

Question information

Language:
English Edit question
Status:
Answered
For:
MariaDB Edit question
Assignee:
No assignee Edit question
Last query:
2010-08-10
Last reply:
2010-08-24
Igor Babaev (igorb-seattle) said : #1

I hardly can associate this case with table elimination. Rather this is an optimization for selection from views. If you have a patch for it we'll add it to the server.

Can you help with this problem?

Provide an answer of your own, or ask Nikolay Mihaylov for more information if necessary.

To post a message you must log in.