473,513 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database optimization width MySQL ?

Object : How to optimize mysql architecture for better web connection
?

Hello, I use phpMyAdmin 2.3.2 and MySQL 3.23.58 and I do not know how
to well-organize mysql architecture for the user convience and
speedness.

On my web site, I call all the stucture from one table (5 colums and
50 rows).

Today, 600.000 connections per day are made to this table.

Each time, the queries using PHP do selections (example> SELECT * FROM
table_website WHERE CODE like 'RLINK%'.

The problems comes more and more often : like
1. mysql_connect(): Host 'localhost.localdomain' is blocked because
of many connection errors.
2. or like the query is very slow.

and I have to reboot the linux server each week to try to avoid these
problems.

We would like to have more people coming and to increase the numbers
to 1 or 1.2M connections per day.

My questions would be :
1. On a architecture point of vue, is it better to have only One table
or to have multi-tables.
2. I read http://www.mysql.com/documentation/m...imisation.html
but I could not find advises concerning many connections to one single
table.

I did not changed any general variable provided in standard width
mysql.

From what you think, What kind of possible implementation or change in
architecture I could make ?

Please Help ! Thank you.

Solange
12 rue de Seine
Design and IT Salle d'exposition
Chicago and Paris
http://www.jssgallery.org and http://www.friend.fr

Here, is the tipical query I make to select items within the table :

<?php
srand ((double) microtime() * 948625);
include "/config/config.php";
$idCnx = mysql_connect($host ,$user,$pass ) or die("Impossible de se
connecter à la base de données");
mysql_select_db($bdd) or die("Impossible de se connecter à la base de
données");
$sql = "SELECT SUM(Proportion) as sum FROM `ISTable` ";
$result = @mysql_query($sql,$idCnx);
$r = @mysql_fetch_array($result);
$SumProportion=$r[sum];
$RANDNUM = rand (1,$SumProportion);
$sql = "SELECT ScriptLink,Proportion FROM `ISTable` ORDER BY
`Proportion` DESC ";
$result = @mysql_query($sql,$idCnx);
$SumProportion=0;
while(($r = @mysql_fetch_array($result)) AND
($SumProportion<$RANDNUM) )
{
$SumProportion=$SumProportion+$r[Proportion];
$HTMLContent=$r[ScriptLink];
}
echo $HTMLContent;
?>
Jul 19 '05 #1
0 1414

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

Similar topics

23
2792
by: ajikoe | last post by:
Hello I need to build table which need searching data which needs more power then dictionary or list in python, can anyone help me what kind of database suitable for python light and easy to learn....
0
375
by: Solange Ezveff | last post by:
Object : How to optimize mysql architecture for better web connection ? Hello, I use phpMyAdmin 2.3.2 and MySQL 3.23.58 and I do not know how to well-organize mysql architecture for the user...
19
2072
by: nospammmer | last post by:
Hello group, I have a rather general but interesting inquiry that is related to PHP and I hope this is the appropriate place to post it. I'm looking for a way to improve dramatically the...
10
4260
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
10
13362
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without...
2
2245
by: basestring | last post by:
Hi I am busy now for many hours without luck I have a database and when I use PHP to add date to it, it works only one time when i want to add the next data, It doesn't work. but i don't get any...
2
3329
by: webcm123 | last post by:
People say that structural programming isn't good for database connection. I code fast-running structural oriented CMS and I don't know what I should do. I use mysql connection using mysql_*. I...
221
366985
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
0
3091
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
0
7161
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
7384
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
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
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
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1596
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
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.