Re: Big database: many SQL tables vs. object serialization

From: Chung Leong (chernyshevsky_at_hotmail.com)
Date: 02/26/05


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" :-)



Relevant Pages

  • Re: Global Temp Table & Multiple Users
    ... design and I'm not sure if performance would be any better. ... about serialization is that it limits the dbms pounding that these reports ... what is happening is this a dynamic SQL ... > The inner proc generates a portion of the SQL, ...
    (microsoft.public.sqlserver.server)
  • Re: Advice on persistent storage in Java?
    ... >>I need some advice on persistent storage in Java. ... objects are meant to store user defined data (the user defines the ... the SQL would probably all be pretty basic. ... i'm thinking about using serialization for now ...
    (comp.lang.java.programmer)
  • Re: does a web developer need to worry about serialization?
    ... "any data I really needed to persist would be saved to sql server." ... Is not it a Serialization? ... to worry about this as a web developer? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: serialize to SQL Server Blob instead of XML serialize
    ... I've never used binary objects in SQL before. ... Dim ms As New MemoryStream ... > I've been experiencing problems on some computers with XML Serialization. ...
    (microsoft.public.dotnet.framework.aspnet)