473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 1406

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

Similar topics

23
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
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
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
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
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
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
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
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
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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
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
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...
0
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,...
0
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...

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.