# \#nz8 Test pass without an index

**URL:** <https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811>\
**Category:** Bug Reports\
**Tags:** challenge:sqlite\
**Created:** [March 29, 2025, 8:31am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811 "2025-03-29T08:31:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HowieTKL](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/howietkl/32/5687_2.png) [@HowieTKL](https://forum.codecrafters.io/u/HowieTKL)\
**Post date:** [March 29, 2025, 8:31am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811/1 "2025-03-29T08:31:24Z")

</div>

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…

```auto
[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.

```

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [March 29, 2025, 9:00am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811/4 "2025-03-29T09:00:48Z")

</div>

That’s quite impressive! The [db file](https://github.com/codecrafters-io/sqlite-tester/blob/main/companies.db) for the final stage is nearly 1GB in size.

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

---

<div class="post-metadata">

**Author:** ![HowieTKL](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/howietkl/32/5687_2.png) [@HowieTKL](https://forum.codecrafters.io/u/HowieTKL)\
**Post date:** [March 29, 2025, 9:46am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811/5 "2025-03-29T09:46:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [July 13, 2025, 12:16am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811/7 "2025-07-13T00:16:28Z")

</div>

We’ll track the issue in [build-your-own-sqlite/issues/130](https://github.com/codecrafters-io/build-your-own-sqlite/issues/130). Closing this thread for now.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [July 20, 2025, 12:16am UTC](https://forum.codecrafters.io/t/nz8-test-pass-without-an-index/7811/8 "2025-07-20T00:16:32Z")

</div>

Closed on July 20, 2025, 12:16am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
