Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database Size Vs PHP Processing Speed

Currently within my application I have a setup where upon submission of data, PHP Processes this data using several functions and then places in the database, for example

The quick brown fox jumps over the lazy dog

Becomes an SEO Title of

the-quick-brown-fox-jumps-over-the-lazy-dog

This string is stored in my database under title_seo, but my question is as follows.

What is more important:

  • The size of the database for storing this extra parsed strings
  • Or the resources used converting them

Now when I say "the resources used converting them", I mean that if I was to remove the column from the database and then parse the general title every time I output the contents.

Obviously when parsing every time the content get's called each request then the PHP usage increase but the database size decreases.

What should I be more worried about ?

like image 493
RobertPitt Avatar asked Dec 10 '25 10:12

RobertPitt


1 Answers

Neither of them.

In this case the computational cost is minimal. But storing the seo_title in your table could allow you to change the url of your article title to whatever you want.

So I would keep the title_seo in the db

like image 71
dynamic Avatar answered Dec 11 '25 23:12

dynamic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!