On 3 Aug 2015, at 1:58pm, Linquan Bai <linquan.bai at gmail.com> wrote:
> I am trying to read large data from the database about 1 million records. > It takes around 1min for the first time read. But if I do the same process > thereafter, the time is significantly reduced to 3 seconds. How can I get a > fast speed for the first time read? You can't. Some part of your computer has pulled that data into cache, and it's still in the cache when you run the process again, so it the data doesn't need to be fetched from disk again. If you tell us how big an average row is (how many bytes of data) then we can tell you whether 1 million rows in 1 minute is a reasonable time. But my guess is that that's more or less the time you'd expect. Simon.