Another option would be to count the number of keys in v_results and compare that to limit + offset, and get rid of v_found altogether.
The counter is probably a quicker option, but I do not know.
Another option would be to count the number of keys in v_results and compare that to limit + offset, and get rid of v_found altogether.
The counter is probably a quicker option, but I do not know.