Does dovecot compute that values for quota2 with each email it updates for the user?  Or only an incremental change?

I ask because I am looking at migrating all the user mail from the old server to the new and building a new sql database.  All I see is:

dovecot-dict-sql.conf.ext:

connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix password=$Postfix_Database_Password
map {
	pattern = priv/quota/storage
	table = quota2
	username_field = username
	value_field = bytes
}
map {
	pattern = priv/quota/messages
	table = quota2
	username_field = username
	value_field = messages
}

what is actually done with this table?

thanks