select i.country_code,c.countries_id,i.state,i.city from ip2location i left join countries c on i.country_code=c.countries_iso_code_2 where 59794403>=i.ip_num_start and 59794403<=i.ip_num_end and i.country_code!='-' - Query execution was interrupted