The MySQL version of the database is Ver 14.14 Distrib 5.7.20 on the server and spring boot version is 3.3.1, when tried to get data from it increases time significantly as compared to local database.
This database is used by a older JSF project.
The MySQL version on my local machine is Ver 8.0.34.
For eg; if a repository hit results in 10ms to get data from local database it takes 400ms to get same data from the database which is located on server.
The database which is on server is same as on my local machine.
I tried changing MySQL connector same as the older project used ie; mysql-connector-java-5.1.37. But with no results.
I have tested the same repository hit with same database values on different server for newer version ie; Ver 8.0.34 and it results in same response time as on local database.
One of the query :
SELECT product_sku_id AS productSkuId, inv_tags_availability_snapshot_id AS invTagsAvailabilitySnapshotId, location_code AS locationCode, tag_net_weight AS tagNetWeight, tag_quantity AS tagQuantity, tag_number AS tagNumber FROM inv_tags_availability_snapshot WHERE inv_tags_availability_snapshot_id = '';