Hello, I'm a student implementing a bulletin board search.
When writing implements pagenation on the current bulletin board at more than 1 million rows,
The number of pages is calculated by using a separate trigger or by using a separate table for counting or a column by working similarly to the trigger on the application server itself.
When you implement a bulletin board search with pagenation, you have to count the number of rows that contain the search word when you search with a specific search word whether you are using LIKE or full-text indexing. It's burdensome to count every time at that moment.
In this case, I can't count in advance, and I want to implement the search part as a pagenation, but I wonder how you usually do it in this situation.
I'd appreciate your help.
Thank you.
mysql
I don't think it's a bad idea to use the trigger.
Another way to not use the trigger is...Well, I think there is a way to cache the query results and re-validate the event that affects the caching.
And you may have searched it, but if you google it with keywords such as "mysql count performance", there seems to be some related information.
© 2024 OneMinuteCode. All rights reserved.