odota / web

React web interface for the OpenDota platform
https://www.opendota.com
MIT License
1.09k stars 390 forks source link

DataExplorer: this request timeouts #3207

Open TheGP opened 1 day ago

TheGP commented 1 day ago

Before it worked and returned data even for 8 hours. Now it cant return event for one second (3600 * 1 is one hour)

Request in data explorer%20-%203600%20*%201%20))%0A%20%20%20%20AND%20lobby_type%20%3D%207%0A%20%20%20%20AND%20(game_mode%20%3D%2022%20OR%20game_mode%20%3D%202)&format=)

SELECT
    match_id,
    start_time,
    avg_rank_tier,
    radiant_win,
    duration,
    radiant_team,
    dire_team
FROM
    public_matches
WHERE
    TRUE
    AND avg_rank_tier >= 70
    AND start_time >= ((extract(epoch from now()) - 3600 * 1))
    AND lobby_type = 7
    AND (game_mode = 22 OR game_mode = 2)

How I can fix it or whats the problem with the server?

howardchung commented 1 day ago

Try ordering and limiting the results, e.g.

order by start_time desc
limit 1