FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Mysqli or PDO Persistent prepared statements
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Mysqli or PDO Persistent prepared statements [message #183655 is a reply to message #183644] Wed, 06 November 2013 20:04 Go to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
Ram, 2013-11-06 10:18:

> I have a very high traffic server. Getting upto a million hits per day.
> These are basically tracking URLs that log the hits and redirect to the relevant page
>
> The current script using php mysql is very slow. I want to switch to mysqli.
> Are there any basic guidelines for shifting to mysqli
> Can I use a persistent prepared statements across different calls to the web server ?

Besides all other tips: Consider using a byte code cache (XCache, APC
etc.) as well and also check if not the database itself is the bottleneck.

A million hits per day may be up to 10 hits per second - and if really
*every* hit results in a database operation it may not just the small
difference between mysql, msqli or PDO which is important here.

Also check your application in a test environment and load/stress
testing tools (ApacheBench, Gatling Curl-loader etc.) to see how your
scripts perform.

Maybe using other techniques may be better - e.g. using a kind of
"cache" for the redirects which can be loaded and used without any
database access at all. If you need to track hits as well it may be
easier to keep process access logs in text form and process them using a
cron job in background and maybe even on another server.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: detection of 2d array?
Next Topic: another value passing problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 18 04:53:29 GMT 2024

Total time taken to generate the page: 0.04587 seconds