RE: [PHP] Fw: mysql ? sybase ? oracle ? postgres ?
| From: | Marc Burgauer | Date: | Mon, 11 Sep 2000 14:54:30 +0000 |
| Subject: | RE: [PHP] Fw: mysql ? sybase ? oracle ? postgres ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16184@lists.php.net to get a copy of this message | ||
Anna
The easy question first:
> is it better to have several simple queries on a page instead of
one
> big query with 4 joins?
This really is a matter of application design. I prefer running one complex
query and the use PHP to disseminate the information, as it reduces the load
on the database side and it seems that the database is more of a bottleneck
then PHP. This is also the main reason I prefer Postgresql over MySQL, so I
can use nested queries.
Now to what's best:
I have enough experience with Oracle and Postgresql to evaluate their
abilities. I have limited experience with MySQL (I used it a lot before I
used Postgresql, but not in the past 3 years). I have NO experience with
Sybase, so I will not say anything about it.
*IF* you can affoard running Oracle, I think you can make a case for it,
looking at the number of users. It just sounds like you will need solid
auditing and backup features and to build this all by hand in a freeware
database might cause just as much development and administration cost as
licensing Oracle. If Oracle is too expensive, you might get a better deal
from Sysbase, but make sure it does fir the bill.
Also, I think that both, MySQL and PostgreSQL will deteriorate in
performance with the number of concurrent connections you encounter. (MySQL
has a tendency to crash when 'overloaded', Postgresql just gets awfully
slow.)
In my application, I also try to avoid persistent connections to minimise
the number of concurrent connections further. If you don't need
transactional functions (e.g. rollback), you could do this too.
I would highly recommend NOT to "simplify" your datamodel. For me, the
"evil" in most applications I come across, are inapropriate data models. You
might gain a little speed now, but should you ever have to extend your data
model, the costs could be devastating, especially if the "simplification"
can not be undone (e.g. too many applications need the data as it is).
I hope this helps!
Cheers
Marc
> -----Original Message-----
> From: Anna Soobrattee [SMTP:annazaraah@yahoo.com]
> Sent: Monday, September 11, 2000 2:14 PM
> To: Marc Burgauer
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Fw: mysql ? sybase ? oracle ? postgres ?
>
> > Can you outline what your requirements are?
>
> - we have 126,000 users all together.
> - max_connections is set to 200 as 100 wasn't good enough. usually
> between 150-250 connections
> - relational database of 50 or so tables.
> - at the most we have queries with 4 joins. most of our queries cross
> over two tables.
> - i'm re-designing the database structure to reduce the number of
> joins - but i think we will still need to do three joins for some
> queries.
>
> is it better to have several simple queries on a page instead of one
> big query with 4 joins?
>
> thanks
> anna
>
> > How many tables would you ideally join in the most complex query?
> (Assuming
> > you can have a nicely normalised datamodel.)
> >
> > No question, Oracle is far more powerful then any competitor, but
> it's also
> > far more expensive! You should also look into optimising your
> database calls
> > from PHP. For example try to get as much information out in a single
> query
> > and directly into PHP and then do all the "data dissimenation" in
> PHP. This
> > can reduce DB load and increase performance.
> >
> > To answer what's best for you, you should illustrate what your
> requirements
> > are in more detail. There is no "one fits all" answer for the "best"
> DB.
> >
> > Cheers
> >
> > Marc
> >
> > =============
> > Marc Burgauer
> > Project Manager
> > Stortext Ltd.
> > 1 Atholl Place
> > Edinburgh, EH3 8HP
> > Tel: 0131 221 8514
> > Fax: 0131 221 8501
> > marc.burgauer@stortext.com
> >
> > > -----Original Message-----
> > > From: Anna Soobrattee [SMTP:annazaraah@yahoo.com]
> > > Sent: Monday, September 11, 2000 12:19 PM
> > > To: php-general@lists.php.net
> > > Subject: [PHP] Fw: mysql ? sybase ? oracle ? postgres ?
> > >
> > > > Hi,
> > > >
> > > > So far my company has been using freebsd-mysql-php for our
> > > webserver.
> > > > However recently, the whole server's speed and has deteriorated
> > > > substantially ( multiple joins, long queries, high traffic).
> I've
> > > > denormalised our database as much as I could to reduce the
> number of
> > > > joins needed, however I think it is time that I moved away from
> > > mysql
> > > > and used another datbase server.
> > > >
> > > > Has anyone got any advice ?
> > > >
> > > > Sybase, Oracle and Postgres have all been recommended. Which
> one is
> > > > most compatible with PHP ?
> > > >
> > > > Thanks
> > > > anna
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------------
> > > > anna soobrattee
> > > > technical director
> > > > themutual.net plc
> > > > 0207 440 9315
> > > >
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at
> > > http://mail.yahoo.com
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> > >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>