How to fix execution time discrepancy curl vs http?

I am attempting to run queries using a http client from within a .Net environment.
The trouble I’m experiencing is noticeable delays in retrieving data; a delay that does not occur when using curl, or running the query by browser url.
The query in question retrieves some 10000 records, from a 6 hour window, with the relevant columns indexed.

Timings=true in the http call provides the following in the response:
{“authentication”:400,“compiler”:1004900,“execute”:1158029000,“count”:0}

Timings=true in the url of the browser gives the following:
“timings”:{“authentication”:300,“compiler”:0,“execute”:3484000,“count”:0}

The webconsole for the same call gives
10,773 rows in 20ms Execute: 3.56msNetwork: 16.44msTotal: 20ms

Is this a consequence of using HttpClient? An erroneous setting somewhere? Or do we simply need to switch to postgreSQl?

Hi @YBrink ,

The web console fetches 1000 rows and then pages the rest, so you are comparing the time to fetch 1000 vs the time to fetch all.

It turned out the two queries were not entirely the same.
One of them had an orderby on a far too large time window.