In a program to find words from a database of 4 million words, I have a timing problem.
If I execute a select statement, for example
SELECT * FROM WORDLIST WHERE LENGTH = 10
and then downloads all the selected data, it takes 6 seconds on a completely just started PC. The second time when I execute another select statement, SELECT * FROM WORDLIST WHERE LANGD = 12, and then retrieve all the selected data, it takes 0.6 seconds. If I exit the program without restarting the PC, restart the program, all the select statements take less than a second.
I've come so far in my research that it's not the Select statement itself that takes time, it's the subsequent fetching of data that takes time.
Anyone have a good explanation?
If I execute a select statement, for example
SELECT * FROM WORDLIST WHERE LENGTH = 10
and then downloads all the selected data, it takes 6 seconds on a completely just started PC. The second time when I execute another select statement, SELECT * FROM WORDLIST WHERE LANGD = 12, and then retrieve all the selected data, it takes 0.6 seconds. If I exit the program without restarting the PC, restart the program, all the select statements take less than a second.
I've come so far in my research that it's not the Select statement itself that takes time, it's the subsequent fetching of data that takes time.
Anyone have a good explanation?