|
Posted by Sandman on 11/24/06 11:14
In article <4566c535$0$335$e4fe514c@news.xs4all.nl>,
Erwin Moller
<since_humans_read_this_I_am_spammed_too_much@spamyourself.com>
wrote:
> 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.
Ok, you lost me. How does it do that? How can a SP store information
about arbitrary member id and give it to PHP at will?
> 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.
Ok, I'd be happy to hear just how it works before nosediving into some
docs about it, to see if we understand each other correctly.
--
Sandman[.net]
Navigation:
[Reply to this message]
|