update_user_meta: How many is too many?

To answer your questions:

Would these high number of calls to update_user_meta cause any
performance degradation?

The Higher the number of calls to the database the slower its going to work since every query takes some (not much but still) time.

Which of the two appears to be a better solution?

Recently I finished a project with similar amount of user settings and the solution i ended up with was to store as an array all of the data that i didn’t need to query or search based on, (since when using array to store data in the data base it is stored serialized ) and the rest (data that needs to by queried based on) as single rows of data, which cut down the queries on one page from 68 to just 7.

Leave a Comment