Unfortunately there is not enough to make any determination of what is happening. At least a query plan is needed. Ideally you could provide some analysis of a heap dump to show what is mostly occupying the heap.
The "GC overhead limit exceeded " indicates that, more than 98% of the total time is spent doing garbage collection and less than 2% of the heap is recovered.
The "GC overhead limit exceeded " in general represent the following cause:
1. When the heap is too small, there is a memory leak. (Try increasing the -Xmx value while starting your process)
2. The old generation size of the heap might be very small compared to the new generation.
3. If increasing the Heap size (-Xmx) OR tuning the Old Generation size does not help then it might be a memory leak in the application code/container code.
Thx. The reason is that our database table is too big and I cannot select *. Thank you all.
Is there other processing going on here? A simple forward only result will be batched to the client so that it would have a negligible memory overhead.