Do hundreds of individual mysql privileges/passwords slow down execution big time?

Posted on 2005-04-10
Last Modified: 2006-11-18
Recently we have had a major problem where php pages on site, which contain numerous mysql database executions, have slowed down and conked out completely because they exceed the maximum of 30 seconds to execute.

This may be a major program flaw, but the pages were originally programmed so that each user accessed the mysql database with their own user id and password, the same as used to login to our site. However, I have read that have to sort through all this permission/privilege/password "overhead" is very resource-consuming. If the number of such users with privilege and passwords for access is nearly 2,000, does this basically explain the major slowdowns and exceeding 30 seconds for php scripts w. a lot of mysql?

If we go back to having one access code/password that all users use encrypted and secured, of course), would that basically solve this problem?
Question by:jristov
    1 Comment
    LVL 20

    Accepted Solution

    I doubt the number of user id's is the cause of the slowdown.  You might create a test db on a different server to simulate the problem.  Just write a script to generate 2000 userid's then test the same process on the test box.  Then remove 1900 of them and retest (or do it theother way around if you prefer).  I don't think you'll see a performance difference just because of the number of userids.

    1.  Which version of MySQL?
    2.  Which table types (innodb, isam, bdb) ?
    3.  How many concurrent connections are you experiencing when access is slow?
    4.  Is the access similarly slow when only a few connections are active?
    5.  Have you recently made any network or db changes that might account for slowness?
    6.  Based on the queries being executed, do you have the right indexes created?

    -- Lynn

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Introduction After workin in a plethora of programming languages like C, Pro*C, ESQL/C, C++, VC++, VB, Java, HTML,JavaScipt etc, technologies and frameworks like JSP, Servlets, Struts, Spring, IBatis etc and databases like MS Access, SQLServer, Inf…
    Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now