```sql

CREATE MATERIALIZED VIEW player_champ_counts_mv
ENGINE = AggregatingMergeTree() ORDER BY (patch_num, my_account_id, champ_id)
as select patch_num, my_account_id, champ_id, countState() as c_state
from full_info
group by patch_num, my_account_id, champ_id;

create view player_champ_counts as
select patch_num, my_account_id, champ_id, countMerge(c_state) as c
from player_champ_counts_mv
group by patch_num, my_account_id, champ_id;
```

2.4s:
`select * from player_champ_counts`

900ms:
```
select patch_num, my_account_id, champ_id, countMerge(c_state) as c
from player_champ_counts_mv
group by patch_num, my_account_id, champ_id;
```

In other words, just inlining the definition of the view is doing something different than querying the view itself.
if (query_info.prewhere_info->remove_columns_actions)
                pipe.addSimpleTransform(std::make_shared<ExpressionTransform>(
                        pipe.getHeader(), query_info.prewhere_info->remove_columns_actions));
        }
        pipes.emplace_back(std::move(pipe));
    }
    pipeline = std::make_unique<QueryPipeline>();
    
    pipeline->addTableLock(table_lock);
    
    {
        const Settings & settings = context->getSettingsRef();
        IBlockInputStream::LocalLimits limits;
        limits.mode = IBlockInputStream::LIMITS_TOTAL;
        limits.size_limits = SizeLimits(settings.max_rows_to_read, settings.max_bytes_to_read, settings.read_overflow_mode);
        limits.speed_limits.max_execution_time = settings.max_execution_time;
        limits.timeout_overflow_mode = settings.timeout_overflow_mode;
        /** Quota and minimal speed restrictions are checked on the initiating server of the request, and not on remote servers,
          *  because the initiating server has a summary of the execution of the request on all servers.
          *
          * But limits on data size to read and maximum execution time are reasonable to check both on initiator and
          *  additionally on each remote server, because these limits are checked per block of data processed,
          *  and remote servers may process way more blocks of data than are received by initiator.
          *
          * The limits to throttle maximum execution speed is also checked on all servers.
          */
        if (options.to_stage == QueryProcessingStage::Complete)
        {
            limits.speed_limits.min_execution_rps = settings.min_execution_speed;