Techiio-author
Started by Bell GrantNov 3, 2021

Open
Fetch 200k records in single JPA select query within 5 seconds

1 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 1 VIEWES SHARE

I need to fetch 200k facts in unmarried JPA choose query inside 5 seconds. I am selecting one column that's already listed. Currently, it's far taking extra than five minutes. Is it possible to choose over 100k of statistics in 5 seconds?

1 Replies

Techiio-commentatorHarry Lian replied 2 months ago0 likes0 dislikes

This is not possible with hibernate or normal native query since it has to create hundreds of thousands of objects on the java side and results need to be sent over the network (Serialization & de-serialization). You could do the below steps for fine-tuning,

1) On the DB side you could change the index method default to is binary tree instead set it as the "HASH" method.

2) Use Parallel threads to retrieve the results in paginated mode (Use native SQL).

Hope it gives some input for further fine-tuning.

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance