Re: MySQL vs Session?
| From: | Bob Irwin | Date: | Thu, 15 Aug 2002 06:46:57 +0000 |
| Subject: | Re: MySQL vs Session? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112702@lists.php.net to get a copy of this message | ||
I'd have to say that I haven't done any controlled tests, but mysql can be
very slow when you are doing a lot of connections (correct me if I'm wrong,
but I think it executes requests in order?).
To be untechnical about it and only speak from experience (if I was a
typical internet user, I'd think that because it does it for me, it must do
it for everyone! :) ), I personally have never found sessions to be slow
getting a lot of data, where as I have found it slow with mysql... probably
also depends greatly on your server load. I'd imagine that you would see a
massive difference on a server that is under load.
Bob
>Which is generally faster/better, doing a SELECT or doing session_start()?
>Rephrased, are sessions significantly faster/lighter than using MySQL?
>I'd imagine they are, since they won't need to do a connection or anything,
>but I am not familiar with how sessions scale.
Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom