Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11747
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Mysqli or PDO Persistent prepared statements |
| Date | 2013-11-06 21:04 +0100 |
| Message-ID | <527AA0B0.3010001@arnowelzel.de> (permalink) |
| References | <fab413de-c3eb-43c9-87e0-dc725e1cb5b6@googlegroups.com> |
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
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Mysqli or PDO Persistent prepared statements Ram <ramprasad.ap@gmail.com> - 2013-11-06 01:18 -0800
Re: Mysqli or PDO Persistent prepared statements The Natural Philosopher <tnp@invalid.invalid> - 2013-11-06 09:46 +0000
Re: Mysqli or PDO Persistent prepared statements Jerry Stuckle <jstucklex@attglobal.net> - 2013-11-06 05:45 -0500
Re: Mysqli or PDO Persistent prepared statements Tobiah <toby@tobiah.org> - 2013-11-06 09:41 -0800
Re: Mysqli or PDO Persistent prepared statements Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-11-06 20:25 +0100
Re: Mysqli or PDO Persistent prepared statements "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2013-11-06 22:06 +0000
Re: Mysqli or PDO Persistent prepared statements Arno Welzel <usenet@arnowelzel.de> - 2013-11-06 21:04 +0100
csiph-web