Tutorial :Is is better to store serialized data or raw html in mysql?


I de-normalized my database, since the application was crawling otherwise, and Im storing a list of categories for each item in the DB as a raw html version, and simply echoing it out in my design. Each category is actually a link, which is include a tag. Naturally, this is abit of a pain, especially if I want to change the look of how the category links are displayed, since I gotta update all the old cached entries.

What if I were to store this data as a serialized array instead, and simply unserialize it, and then apply formatting to it in php. Would there be a significant performance decrease over simply echoing out the raw html?


It's a bad idea to store values serialized only for a specific language in a database.

Did you consider memcache to reduce "crawls" of your database? I usually find caching to be a much more elegant and flexible solution than a de-normaliezd database.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »