Hello Fellow Programmers,
I have an issue with a very large PHP page that calls over 20 different MySql Statements. This page is loading somewhat slow and i want to speed things up. I have looked into sql caching applications like http://eaccelerator.ne t/ and http://www.danga.com/memcached/ which i may install later, but i feel they are more for pages that are called frequently, my page calls the same data less times but can call more than 2000 different versions of the data.
Being that my page is a little over 1000 lines, putting it all here is not gonna happen. I will try to shorten the code using examples... After writing the blow code.. it may be really confusing. I have stuck the file on my server http://www.empiresolut ions.net/clients/zell/green_bar.zip in case anybody whats to get a better look. This file in it current state works fine, just is slow. Any and all help is so appreciated.
Another Question... Can anyone provide suggestions on how to bench-test my sql scripts to see exact improvment speeds?
Each indent means the following query is nested. -
Query 1 (2 Join Tables)
-
-
Query 2 (2 Join Tables)
-
-
Query 3 (1 Table)
-
-
Query 4 (4 Join Tables, While Loop)
-
-
Query 5 (2 Join Tables)
-
-
Query 6 (1 Table)
-
-
Query 7 (4 Join Tables, While Loop)
-
-
Query 8 (2 Join Tables)
-
-
Query 9 (1 Table)
-
-
Query 10 (1 Table, While Loop)
-
-
Query 11 (2 Join Tables, Calls every 10 rows from Query 10)
-
-
Query 12 (2 Join Tables, Calls every 10 rows from Query 10, same as Query 11 basically)
-
-
Query 13 (2 Table, While Loop)
-
-
Query 14 (1 Table)
-
-
Query 15 (2 Join Tables, This query and subs are called 4 times in a FOR loop)
-
-
Query 16 (2 Join Tables)
-
-
Query 17 (2 Join Tables)
-
-
Query 18 (1 Table)
-
-
Query 19 (2 Join Tables)
-
-
Query 20 (1 Table)
-
1 1715
Have you ever used the MySQL EXPLAIN function as a way to obtain information about how MySQL executes a SELECT statement?
That way you can get information on your queries. See Optimizing queries with EXPLAIN
Ronald :cool:
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: leegold2 |
last post by:
Not sure if I should post in php or sql,
$query = "SELECT page.*, url_pages.* FROM `page` LEFT JOIN `keywords`
USING(`page_id`) LEFT JOIN URL_PAGES USING (`page_id`) WHERE
MATCH(`keywords`.`keyword_txt`) AGAINST ('$keyword'IN BOOLEAN MODE)";
I got a keyword table, the fulltext finds the word in the keywords table
and relates the page_id field to identical fields in the page table and
the url table.
|
by: Brian |
last post by:
Hello
I am using version 4.0.12-nt of MySQL and when I hit the enter key
rapidly I can't connect to the database. The result is a message is
returned to me from mysql that says I can't connect because the
database is down. If I only hit the 'enter' key once (to execute the
page that my queries are on(their are four queries on this particular
web page)) my queries execute just fine.
We have noticed that this only happens when we:
|
by: George |
last post by:
Hi,
The storeprocedure fails with null exception on the DB2 development
centre for SELECT querys for all tables that has the number of columns
greater than 10.
Strange ,but true ..i reinstalled DB2 and tried again it still fails.
I cant find anything in db2diag.log ..Is there anywhere else i need to
look??
|
by: Stu |
last post by:
I have a few FrontPAGE 2002 Webs running on Windows 2003 Servers and
IIS. My webs use ASP (classic) pages that display data pulled from
the Access databases using the FrontPage database results wizard -
displaying query results, etc. from my main database. It works fine
when the database contains the tables/data but when the tables are
linked to external tables within *.mdb files (located in the same web
folder - /fpdb) or if I split the...
|
by: Merja |
last post by:
Is there a quick and easy way to locate tables/querys in the
relationships view? If you have over 100 tables in your database it
usually takes a long time before you find something in the
relationships view...
| |
by: dale zhang |
last post by:
Hi,
I build a web form with a 4-cell table on the top (flawlayout), followed by
some labels and textboxes (gridlayout). The web form is displayed well in
dell m60 laptop with all resolution options and DPI options. However when I
tried to run it in a dell P3 desktop, labels and textboxes overlapped each
other and they were in table area too.
Any suggestions? Do I have to put all controls in table cells?
|
by: Stephen Preston |
last post by:
I can't get an $array to be used as a select query on a mySQL database.
I have a 'parts list' which displays on a page (works fine) and is a form.
At the end of each row is a input type='text' (quantity) cell with a default
0
The quantity can be altered.
At the bottom of the table (form) is a submit to basket Button
echo "<form action='basket.php' method='POST'>\n";
|
by: Jack |
last post by:
Hi,
I have the following Access DDL statment from which I generated a access
table:
CREATE TABLE TEST1
(ID COUNTER,
NAME TEXT(50),
STORAGESPACEASSIGNED TEXT(50)
)
|
by: Chifo |
last post by:
hello.
i have a problem with a populate html table with data from table here
it's the problem
two querys retrieving data from table, one of querys show me a
colletion of data from 6:00 am to 15:30 pm timestampz, i put this on a
part of html table. when time on my if condition es great than 15:31,
showme data from 15:31 to 23:59 timestamp and populate another part of
html table.
but, data in html first part,it's gone away.
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |