You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT count(*) FROM digitap.vkyc_okyc_transaction_id_mapping AS A INNER JOIN digitap.user AS B ON (B.client_partner_user_id = A.partner_unique_id) WHERE (A.enterprise_id = 1);
But generated query is
SELECT A.id,A.ent_user_log_subscription_service_mapping_id,A.partner_unique_id,A.status,A.enterprise_id,A.url,A.skip_okyc,A.created_on,A.updated_on, B.id,B.mobile,B.email,B.password,B.fname,B.lname,B.palgo,B.salt,B.type,B.createdOn,B.updatedOn,B.partner_user_id,B.client_partner_user_id FROM digitap.vkyc_okyc_transaction_id_mapping AS A INNER JOIN digitap.user AS B ON (B.client_partner_user_id = A.partner_unique_id) WHERE (A.enterprise_id = ?) [Integer 1]
Which results in getting entire data from database to java layer and treats it has a collection and then stream the collection to find the count which results in huge performance impact
SELECT A.id,A.ent_user_log_subscription_service_mapping_id,A.partner_unique_id,A.status,A.enterprise_id,A.url,A.skip_okyc,A.created_on,A.updated_on, B.id,B.mobile,B.email,B.password,B.fname,B.lname,B.palgo,B.salt,B.type,B.createdOn,B.updatedOn,B.partner_user_id,B.client_partner_user_id FROM digitap.vkyc_okyc_transaction_id_mapping AS A INNER JOIN digitap.user AS B ON (B.client_partner_user_id = A.partner_unique_id) WHERE (A.enterprise_id = ?) [Integer 1] order by B.fname limit 0,25;
But generating
SELECT A.id,A.ent_user_log_subscription_service_mapping_id,A.partner_unique_id,A.status,A.enterprise_id,A.url,A.skip_okyc,A.created_on,A.updated_on, B.id,B.mobile,B.email,B.password,B.fname,B.lname,B.palgo,B.salt,B.type,B.createdOn,B.updatedOn,B.partner_user_id,B.client_partner_user_id FROM digitap.vkyc_okyc_transaction_id_mapping AS A INNER JOIN digitap.user AS B ON (B.client_partner_user_id = A.partner_unique_id) WHERE (A.enterprise_id = ?) [Integer 1]
Without order by and limit clause again this results in a major impact, it selects all the rows from the database and applies sort on and group by on top of it
The text was updated successfully, but these errors were encountered:
prabha05081997
changed the title
Speedment doesnot generate proper queries in joins while applying count and sort
Speedment does not generate proper queries in joins while applying count and sort
Jan 9, 2021
prabha05081997
changed the title
Speedment does not generate proper queries in joins while applying count and sort
Bug:Speedment does not generate proper queries in joins while applying count and sort
Jan 11, 2021
Hi minborg,
We've tried with version 3.2.10, but still, the issue is not yet resolved.
Basically, we're trying to achieve pagination, so as the number of records grows getting count in an above-mentioned way could be a huge performance impact for us.
can you please take this as a high priority?
Count
Should generate a query equivalent to
But generated query is
Which results in getting entire data from database to java layer and treats it has a collection and then stream the collection to find the count which results in huge performance impact
Order by and Limit
Should have created
But generating
Without order by and limit clause again this results in a major impact, it selects all the rows from the database and applies sort on and group by on top of it
The text was updated successfully, but these errors were encountered: