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
I am using the following query to retrieve users from database, and before this one i just perform a count(*) to retrieve the total number of users.
SELECT coalesce(json_agg(_0_users),'[]') as users
FROM (
SELECT row_to_json((
SELECT _0_users
FROM ( SELECT _0_users.id,_0_users.email,_0_users.password,_0_users.name,_0_users.last_name,_0_users.created_at,_0_users.verified,_0_users.blacklist,_0_users.profile_image,_0_users.role_id,_0_users.country_id,_0_users.city,_0_users.phone,_0_users.address,_0_users.postal_code,_0_users.is_business,_0_users.business_name,_0_users.business_address,_0_users.business_country_id,_0_users.vat,_0_users.parent_id) _0_users )) _0_users
FROM (
SELECT _0_users.id,_0_users.email,_0_users.password,_0_users.name,_0_users.last_name,_0_users.created_at,_0_users.verified,_0_users.blacklist,_0_users.profile_image,_0_users.role_id,_0_users.country_id,_0_users.city,_0_users.phone,_0_users.address,_0_users.postal_code,_0_users.is_business,_0_users.business_name,_0_users.business_address,_0_users.business_country_id,_0_users.vat,_0_users.parent_id FROM public.users _0_users
) _0_users
) _0_users
The execution with nodejs v18.17.1 / v20.9.0 - pg ^8.11.0 results to something between 60 and 92 ms for both count and the query mentioned above, but the same process with nodejs v16.20.2 results to 12ms for both queries (average).
Are there any issues with node-postgres and nodejs versions > 16? Am I missing something?
The text was updated successfully, but these errors were encountered:
I am using the following query to retrieve users from database, and before this one i just perform a count(*) to retrieve the total number of users.
The execution with nodejs v18.17.1 / v20.9.0 - pg ^8.11.0 results to something between 60 and 92 ms for both count and the query mentioned above, but the same process with nodejs v16.20.2 results to 12ms for both queries (average).
Are there any issues with node-postgres and nodejs versions > 16? Am I missing something?
The text was updated successfully, but these errors were encountered: