machadokd.
CCConvex Community
•Created by machadokd. on 6/6/2024 in #support-community
Group by without hitting database limits
I tried to do this:
And it didn't do what I wanted, it keep the most creativeId occurencies out of the query
11 replies
CCConvex Community
•Created by machadokd. on 6/6/2024 in #support-community
Group by without hitting database limits
I have a document like this:
And I want to group by
creativeId
and order by the most occurencies. I will then expose this on my client side. I took a look at the indexes but those seems like a perfomant way to query data, not to do what I want.
My fear of using pagination is to miss on these aggregation. Say one page comes like:
Then I would miss the creativeId = 1 from page 2, if I load only the first page.
I though about doing another table where I would store the reference and when inserting on the table1 I would also insert on table 2 with this data already processed, like:
Then I could create a query from table 2 sorting from the count and grabbing the info I want from table 2 according to the results.
I wonder if there's another way I can do that with convex.11 replies
CCConvex Community
•Created by machadokd. on 6/6/2024 in #support-community
Group by without hitting database limits
The table is big, holding thousands of records
11 replies
CCConvex Community
•Created by machadokd. on 6/6/2024 in #support-community
Group by without hitting database limits
My use case is that I scrape a website every 15 minutes. And I wan to group the results by a specific field. I thought I could make the db group that for me. But I need to do that aggregation in memory. I’m afraid of using pagination and missing some records
11 replies