Thread 1 : gets offset 0 limit 5000 Thread 2 : gets offset 5000 limit 5000 Thread 3 : gets offset 10000 limit 5000 Would there be any other faster way than what It thought?
Yeah, sure, use a thread which does the whole query (maybe using a cursor) and fills a queue with the results, then N threads consuming from that queue... it will work better.