I have a query that gives the total number of rows to use in a pagination:
select count(1) as total_rows from (subquery with some sum() and 2 inner joins) as as total_sums ;
when I run only the subquery it takes 15s
when I run the count against the subquery it takes 50 secs.
I am wondering to know if Vertica offers a better way to get the total of rows from an aggregation query.