473,503 Members | 11,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

performance issues

Hi all, just had a couple of performance questions for you to ponder...

I am running a fairly large php/mysql app. In total it is only about
100 or so separate php files, but it is large because I have multiple
clients and each currently gets their own directory with a copy of each
of these files, which adds up quickly.

My question is this... would it be better to give each client their own
actual copy of each file, or would it be better to just have 1 copy of
each file in a central location and serve the right dynamic content
depending on what certain session variables contain? (this is not a
problem to do at all). My original thinking was that giving each client
their own copy of all files would hopefully prevent problems with too
many people trying to access a single file at the same time, but now I
am wondering if in fact accessing multiple files at different places on
the server would create problems itself. Also, the one copy method
makes updates much easier as I only have to update one location. Does
anyone know a rough estimate for a threshold of simultaneous or near
simultaneous requests for a single file that Apache 1.3.x can handle
without problems?

My second and last question has to do with my database structure...
currently, each client has their own tables in the database with a
unique name they choose appended to all of their table names as a
prefix. Would it instead be wiser to create an individual database for
each client? My concern now is that when too many tables are created in
my current database, there might be more overhead in performing
queries... I am not sure which method would be more beneficial.

Thanks so much in advance for any help you can provide.

- Marcus

Jul 17 '05 #1
1 1472
On Mon, 13 Oct 2003 12:20:16 -0500, Marcus <Ju********@aol.com> scrawled:
Hi all, just had a couple of performance questions for you to ponder...

I am running a fairly large php/mysql app. In total it is only about
100 or so separate php files, but it is large because I have multiple
clients and each currently gets their own directory with a copy of each
of these files, which adds up quickly.

My question is this... would it be better to give each client their own
actual copy of each file, or would it be better to just have 1 copy of
each file in a central location and serve the right dynamic content
depending on what certain session variables contain? (this is not a
problem to do at all). My original thinking was that giving each client
their own copy of all files would hopefully prevent problems with too
many people trying to access a single file at the same time, but now I
am wondering if in fact accessing multiple files at different places on
the server would create problems itself. Also, the one copy method
makes updates much easier as I only have to update one location. Does
anyone know a rough estimate for a threshold of simultaneous or near
simultaneous requests for a single file that Apache 1.3.x can handle
without problems?
Don't use sessions - use a nice trick....

Create a config directory which contains in it files of the form:

www.client1_site.com.inc
www.client2_site.com.inc
www.client3_site.com.inc

and chose the appropriate config based on the server name, then
you need just one copy of all the files. (this include file contains
configurations for databases security etc)

If there is different static content you may need separate directories
for each of these subsections.
My second and last question has to do with my database structure...
currently, each client has their own tables in the database with a
unique name they choose appended to all of their table names as a
prefix. Would it instead be wiser to create an individual database for
each client? My concern now is that when too many tables are created in
my current database, there might be more overhead in performing
queries... I am not sure which method would be more beneficial.

I would chose different databases for each client - as it becomes much
easier to back-up, and your code becomes simpler - no more

"select * from $CLIENT"."_table1 where ID = 1"

style queries

just "select * from $CLIENT"."_table1 where ID = 1"

Security of data is easier - you can have separate permissions for each
one more easily;

Maintenance is easier - I want a new databases..
mysql -.. NEWCLIENT < schema.sql
and away you go....
Thanks so much in advance for any help you can provide.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
3452
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
5
4672
by: sandy | last post by:
Hi All, I am a newbie to MySQL and Python. At the first place, I would like to know what are the general performance issues (if any) of using MySQL with Python. By performance, I wanted to...
2
1632
by: Unruled Boy | last post by:
1.The follow two ways to declare one object: any difference? especially its performance. a.Private m_objMyObject As MyObject=New MyObject() b.Private m_objMyObject As MyObject m_objMyObject=New...
9
5742
by: Java script Dude | last post by:
In many languages, it is necessary to string together multiple strings into one string for use over multiple lines of code. Which one is the most efficient from the interpreters perspective: ...
16
2636
by: David W. Fenton | last post by:
http://www.granite.ab.ca/access/performancefaq.htm I hope Tony doesn't mind my opening a discussion of some issues on his performance FAQ page here in the newsgroup. This is not meant as...
115
7469
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
4
3352
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design)....
19
3127
by: Tom Jastrzebski | last post by:
Hello, I was just testing VB.Net on Framework.Net 2.0 performance when I run into the this problem. This trivial code attached below executed hundreds, if not thousand times faster in VB 6.0...
8
1697
by: Dmitry Akselrod | last post by:
Hi, I have a recursive application that walks through a directory structure on a Hard Drive and writes various file information to a single table in an Access 2003 database. I am opening a...
2
2407
by: Brian Tabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.