The original poster, n1bff, is experiencing slow Data Explorer queries. They report a query execution time of 7.9 ms in the admin backend, but a much longer time (150 ms) when accessing the query result via the browser, and an even longer time (around 200 ms) when using curl.
Falco suggests that the slow performance is due to the large amount of data being transferred and de/serialized. They propose solutions such as lowering the row counts per page, building a custom plugin with caching and optimized data format, or querying the underlying database directly.
n1bff notes that even with a single row result, the query takes significantly longer to retrieve via the API. They would like to avoid building a custom plugin or querying the database directly, as they were drawn to Data Explorer for its ease of use and well-working API.
sam mentions that “magical lookups” for certain column names might be causing the issue, but n1bff notes that their query only uses these lookups for JOINs, not in the result set.
sam asks if the issue could be network-related, and n1bff reports that the server time for the request is around 10 times the query execution time, suggesting that the issue may indeed be related to network latency.