Sample Header Ad - 728x90

Write a slow SQLITE query to test timeout

2 votes
1 answer
2166 views
Is it possible to write a 'simple' SQLite query that will take more than 5 seconds to run. I am writing some unit-tests in my application to log slow queries, to that end, I would like a slow query that I know will take more than 5 or 10 seconds to run, (and create a warning to be raised/logged). I was thinking of creating 10 tables with 10 entries in each table and doing a join select on all the table. But I am not sure if that is a good way of testing a slow select, (rather than a large return set).
Asked by Simon Goodman (145 rep)
Apr 10, 2018, 07:38 PM
Last activity: Apr 11, 2018, 10:56 AM