View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 11:29 AM
omeldoid@gmail.com
 
Posts: n/a
Default Re: performance: many rows vs. long columns

On Nov 3, 1:15 pm, "J.O. Aho" <u...@example.net> wrote:

> I highly recommend you have one row for each link user to one city.
> If the table you are thinking of has more info than just username and city,
> then you create a link table which links the user to a city. As you should
> avoid to duplicate data.


> Having all in one column, would ease the databases load when using simple
> SELECT, but you tenfold the load on your script, which has to do all the stuff
> that the database had done fast with low CPU usage if you had a row for each
> link user-city.
> It's a higher risk that you make a bad code in your script than the code that
> makes up the database server, so you would have the risk that you even let the
> load on your script to be even higher.


a highly informative answer. thank you very much.

Reply With Quote