Is using many boolean columns faster than a longer string in MySQL combined with PHP? -


in mysql, faster use:

  1. many boolean columns (for example 100)
  2. varchar(100) string (consisting of 0 , 1)

the advantage of first option ability read , update specific values only. in second 1 have handled via php.

the possible disadvantage of first option may column count if whole row has selected (or more of them). in second option 1 varchar value selected per row , rest handled via php. not sure one.

ps: around column count answer change if @ all?

as see it, use of long varchar column , consist many properties inside it, wrong , because maintenance , handling bad , difficult , , lead many errors hard spot.

each indication should have column of it's own , , optimizer should know how deal many boolean columns efficiently .


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -