MySQL will use only one index per table per query
select @id;select @id:=max(id) as 'maxId' from transaction;select @id;
~
select @id;set @id=(select max(id) as 'maxId' from transaction);select @id;
select status, count(ip) as 'request', count(distinct ip) as 'unique' from monitor_msisdn group by status;
select count(*), count(distinct ip) from monitor_msisdn;
select date, case status when "failed" then 1 when "success" then "Ok" end from monitor_msisdn limit 10;
Title:
Set value for variable by query
Description:
MySQL will use only one index per table per query select @id;select @id:=max(id) as 'maxId' from transaction;select @id; ~ selec...
...
Rating:
4