The reason for the huge difference in query execution time is the amount of data being retrieved. In one case, you load all the data from the table, so the query is slow. In the other case, you load the data in parts, just as much as fits on the screen, so the query is fast.