I have quite complicated view in mysql, like

```
select filter.id as filter_id, person.id, person.name
from person, filter
inner  join 
...
left join
...
where person_match_filter_condition ...
group by filter.filter_id, person.id, person.name

```

Query filters person which corresponds domain specific conditions.

Typical use of view is:

```
select * from where filter_id = some_value

```

Problem is that mysql cannot optimize query. It applies confition by filter\_id AFTER get data for all filters - very ineffective.
Idea to get filter\_id from other tables is not good for my case.

How can I transform my query to make it more effective?