Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Query "too long to run" when no data found #80

Open
markdlehane opened this issue Jun 8, 2017 · 2 comments
Open

Query "too long to run" when no data found #80

markdlehane opened this issue Jun 8, 2017 · 2 comments

Comments

@markdlehane
Copy link

When querying the Transport data set (see SQL below) the response comments that the "Query would take too long to run, please apply a LIMIT of less than 5000 rows". I suspect that there is no data available for the road, start_date and end_date and that the response should be changed to show that data is not available.

This is the query:

select *
from planned_road_works
where road = 'M20'
and start_date > '01/01/2017'
and end_date < '07/01/2017'
limit 10

If I change the start and end dates to '01/01/2013' and '07/01/2013' respectively, data is returned.

Thank you. This has fantastic potential.

@rossjones
Copy link
Contributor

Yeah, we've had a few issues reported on this behaviour, I think there is data, but quite a lot of it with potentially some bad indexes :(

Unfortunately, as it's a proof of concept (as mentioned at https://data.gov.uk/data/api/) it's unlikely to be fixed before the service is withdrawn. The aim of the data api was to obtain feedback about whether the service was something that people would like us to invest time in, but unfortunately we didn't get a lot.

@markdlehane
Copy link
Author

markdlehane commented Jun 9, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants