简体   繁体   中英

Improving performance: How can I archive Grails Domain Class

I am running a blog site built on top of grails. Over the time the mysql database is growing. The database has a table name 'post'. This table contains almost 1 million entries. Querying this table is becoming very time consuming.

Now I am trying to split the table and want to archive old entries. So that complicated database queries take less time.

What I am trying to accomplish is something like this,

class Post{
    //... properties
}

class PostArchive extends Post{

}

Will this approach increase performance? Is there any plugin available for accomplish these type of task?

We create an abstract domain with our core setup and then extend from that. So you would have

abstract class BasePost {

class Post extends BasePost{

class PostArchive extends BasePost{

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM