You are here: Re: Advice about fetching user information « PHP Programming Language « IT news, forums, messages
Re: Advice about fetching user information

Posted by Erwin Moller on 11/24/06 10:11

Hi Sandman,

One last idea: stored procedures.
I don't know if mySQL has support for them, but they can speed things up
hugely. (I am a Postgres-guy)

You can move the logic from PHP to the stored procedure.
The SP will fetch the needed info from the tables based on what it found in
earlier queries (in the same SP).

I don't like SP because they hide the logic away from the language to the
database, are hard to debug, are hard to update, but they ARE fast.

The advantage is also that you do not have to place/parse/check the
recordset from MySQL memoryspace to PHP memoryspace.

The SP will simply deliver what PHP needs to know.

I once made a SP excactly for this reason, it delivered ready-to-go HTML and
removed all the logic from the language (Java in this case) to Postgres,
but then 3 years later I had to update it.... Really hard.
I avoid SP as hell since then. Maybe people with more experience than I have
with SP can do better jobs.

But I am quite sure SP CAN solve your speedproblem.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация