Re: Big database: many SQL tables vs. object serialization
From: Chung Leong (chernyshevsky_at_hotmail.com)
Date: 02/26/05
- Next message: Chung Leong: "Re: globals and super globals"
- Previous message: Chung Leong: "Re: which tool (written in PHP) to deal with db by interface friendly (like access)?"
- In reply to: Alessandro Ranellucci: "Big database: many SQL tables vs. object serialization"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Feb 2005 00:43:32 -0500
"Alessandro Ranellucci" <alex@primafila.net> wrote in message
news:alex-75D159.10461125022005@powernews.iol.it...
> I'm building a PHP+MySQL application for a large website, with 100.000+
> records in the main table, each one with a lot of dependencies in other
> SQL tables. Thus each page view requires many SQL queries and/or joins.
>
> Since I want to optimize performance, I'm wondering whether it would be
> better to serialize full objects instead and store them in a single
> table's TEXT field. This way I could just retrieve the row and
> unserialize it, avoiding other queries. So far this is my comparison:
>
> Pros:
> - only one query per page view
>
> Cons:
> - not only a bigger database, due to serialization overhead, but a
> single HUGE table (does this slow down things more than doing many
> queries?)
>
> Of course there are other drawbacks I actually don't care, such as
> getting a very PHP-specific database or limiting retrival to IDs.
>
> Does anybody have any advice about this? (Other than "try and benchmark
> it" :->)
Instead of the standard PHP serialization functions, use WDDX serialization.
Then you wouldn't have a PHP-specific database. More importantly, you can
claim to be in the forefront of technology with your "XML database" :-)
- Next message: Chung Leong: "Re: globals and super globals"
- Previous message: Chung Leong: "Re: which tool (written in PHP) to deal with db by interface friendly (like access)?"
- In reply to: Alessandro Ranellucci: "Big database: many SQL tables vs. object serialization"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|