I have 5000 records to be saved. what is the best way in the database point of view, whether to save individual records(save(record) 5000 times) or saveAll(list of 5000 records)
Use the feature batch Insertion in Hibernate.
Batch Insertion is a powerful feature of hibernate particularly useful when you are importing data from other systems in batch. If you do not use batch feature of hibernate, your application's performance may decrease dramatically at the time of insertion of many records.
Here is a simple comparison on normal save and Batch insert.
And also official docs.