#nz8 Test pass without an index

For the last stage I have not yet implemented the index lookup. Something seems amiss because my code is taking ~7s yet it passes the final stage test…

[tester::#NZ8] Running tests for Stage #NZ8 (Retrieve data using an index)
[tester::#NZ8] $ ./your_program.sh test.db "SELECT id, name FROM companies WHERE country = 'montserrat'"
[your_program] 4472846|university of science, arts & technology
[your_program] 5316703|the abella group llc
[your_program] 288999|government of montserrat
[your_program] INFO SQLCommand - Query time=7319ms
[tester::#NZ8] $ ./your_program.sh test.db "SELECT id, name FROM companies WHERE country = 'north korea'"
[your_program] 986681|isn network company limited
[your_program] 1573653|initial innovation limited
[your_program] 2828420|beacon point ltd
[your_program] 3485462|pyongyang university of science & technology (pust)
[your_program] 3969653|plastoform industries ltd
[your_program] 4271599|korea national insurance corporation
[your_program] INFO SQLCommand - Query time=7060ms
[tester::#NZ8] Test passed.

That’s quite impressive! The db file for the final stage is nearly 1GB in size.

I’ll check in with the team to see what we can do here.

According to the instructions, shouldn’t we be expecting timings of less than 3s with an index? In which case, the test should’ve flagged my program with a runtime over 7s as a failure.

To test whether your implementation actually uses an index, the tester will use a database is ~1GB in size and expect your program to return query results in less than 3 seconds.

1 Like