473,804 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP + MS Access + How to increase the speed scripts are executed at.

Hi,

Background:

I have written a Call Logging and Reporting System using PHP that integrates
with an existing MS Access Database. The information in the database is all
held in flat tables with no relationships (I don't know why they did this)
and the users are currently using VBA forms to enter info into the database,
this meant that each time someone wanted to do a report of the call's
recorded over the last week that they would have to go throught the database
themselves and compile a report (e.g. re-type the info into excel or
something). I'm using PHP/GD to generate bar/pie charts and reports in HTML,
PDF and ms excel formats (well a CSV file).

Question:
Each call needs to be allocated a unique number, the way I'm doing this at
the moment is using SQL to look through the database and find the last
record and then incrementing it. The problem is that at the moment there are
over 40,000 records in the database and its taking roughtly about 11 seconds
for that call logging PHP page to load. Is there anyway of improving this
(other than increasing memory/processing power on the server side).

Thanks,

Tony.


Jul 17 '05 #1
5 2478
In article <%X************ *******@news.in digo.ie>,
"Tony Clarke" <cl*****@eircom .net> wrote:
Hi,

Background:

I have written a Call Logging and Reporting System using PHP that integrates
with an existing MS Access Database. The information in the database is all
held in flat tables with no relationships (I don't know why they did this)
and the users are currently using VBA forms to enter info into the database,
this meant that each time someone wanted to do a report of the call's
recorded over the last week that they would have to go throught the database
themselves and compile a report (e.g. re-type the info into excel or
something). I'm using PHP/GD to generate bar/pie charts and reports in HTML,
PDF and ms excel formats (well a CSV file).

Question:
Each call needs to be allocated a unique number, the way I'm doing this at
the moment is using SQL to look through the database and find the last
record and then incrementing it. The problem is that at the moment there are
over 40,000 records in the database and its taking roughtly about 11 seconds
for that call logging PHP page to load. Is there anyway of improving this
(other than increasing memory/processing power on the server side).


Usually database problems like this are because the query is being
performed on a field that requires a full table scan (i.e. a linear
scan, row by row, of the entire database). If you were running MySQL,
I'd advise adding a indexed key to speed up things.

You might buy a MS Access book that focuses on performance issues to
give you advise on how to optimize your queries and table layout.

Or a bigger box.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2
"Tony Clarke" <cl*****@eircom .net> wrote in message
news:%X******** ***********@new s.indigo.ie...
Hi,

Background:

I have written a Call Logging and Reporting System using PHP that integrates with an existing MS Access Database. The information in the database is all held in flat tables with no relationships (I don't know why they did this)
and the users are currently using VBA forms to enter info into the database, this meant that each time someone wanted to do a report of the call's
recorded over the last week that they would have to go throught the database themselves and compile a report (e.g. re-type the info into excel or
something).
The mind boggles, exporting Access data to Excel is fairly trivial.
I'm using PHP/GD to generate bar/pie charts and reports in HTML,
PDF and ms excel formats (well a CSV file).
Why not use COM?
Question:
Each call needs to be allocated a unique number, the way I'm doing this at
the moment is using SQL to look through the database and find the last
record and then incrementing it.
Why not use an autonumber field, it does what it says on the tin.

Is the unique field designated primary key?

Is your SQL query written correctly?

SELECT TOP 1 Call.id, Call.name
FROM Call
ORDER BY Call.id DESC;
The problem is that at the moment there are
over 40,000 records in the database and its taking roughtly about 11 seconds for that call logging PHP page to load. Is there anyway of improving this
(other than increasing memory/processing power on the server side).


Use a proper SQL database.

Store the sequence number in a table with one row.
Jul 17 '05 #3
The reason why I stuck with the Access database was beacuse it had al the
info in it already. I was just really trying to patch the existing database
with PHP to generate reports (I'm not sure why they don't use the export
facility in Access...possib ly they don't know it exists!).
One of the reasons that I tried to redesign it was because everyone
access's the database directly and uses the same VBA forms and as such the
database constanly locks. Which means whoever is locking the database must
save their record.

If I was designing it I would have used MySQL. Is there an easy way to
convert from an Access to MySQL database and would doing so yield a
significant performance increase?

"CJ Llewellyn" <in*****@exampl e.con> wrote in message
news:cn******** **@slavica.ukpo st.com...
"Tony Clarke" <cl*****@eircom .net> wrote in message
news:%X******** ***********@new s.indigo.ie...
Hi,

Background:

I have written a Call Logging and Reporting System using PHP that

integrates
with an existing MS Access Database. The information in the database is

all
held in flat tables with no relationships (I don't know why they did this) and the users are currently using VBA forms to enter info into the

database,
this meant that each time someone wanted to do a report of the call's
recorded over the last week that they would have to go throught the

database
themselves and compile a report (e.g. re-type the info into excel or
something).


The mind boggles, exporting Access data to Excel is fairly trivial.
I'm using PHP/GD to generate bar/pie charts and reports in HTML,
PDF and ms excel formats (well a CSV file).


Why not use COM?
Question:
Each call needs to be allocated a unique number, the way I'm doing this at the moment is using SQL to look through the database and find the last
record and then incrementing it.


Why not use an autonumber field, it does what it says on the tin.

Is the unique field designated primary key?

Is your SQL query written correctly?

SELECT TOP 1 Call.id, Call.name
FROM Call
ORDER BY Call.id DESC;
The problem is that at the moment there are
over 40,000 records in the database and its taking roughtly about 11

seconds
for that call logging PHP page to load. Is there anyway of improving this (other than increasing memory/processing power on the server side).


Use a proper SQL database.

Store the sequence number in a table with one row.

Jul 17 '05 #4
"Tony Clarke" <cl*****@eircom .net> wrote in message
news:aE******** ***********@new s.indigo.ie...
The reason why I stuck with the Access database was beacuse it had al the
info in it already. I was just really trying to patch the existing database with PHP to generate reports (I'm not sure why they don't use the export
facility in Access...possib ly they don't know it exists!).
One of the reasons that I tried to redesign it was because everyone access's the database directly and uses the same VBA forms and as such the
database constanly locks. Which means whoever is locking the database must
save their record.

If I was designing it I would have used MySQL. Is there an easy way to
convert from an Access to MySQL database and would doing so yield a
significant performance increase?


There is no easy way to convert from Access to MySQL. You can use the
Upsizing Tool to convert to M$ $QL $erver.

You'd have to create all the tables in a MySQL database and redevelop all
their forms to use the new tables.

If the application is of significant business value then they really do need
to sanction a redevelopment of the system using more appropriate
technologies. That is the only way to guarantee performance.

Otherwise read my performance hints in the previous post.
Jul 17 '05 #5
Thanks CJ.
"CJ Llewellyn" <in*****@exampl e.con> wrote in message
news:cn******** **@slavica.ukpo st.com...
"Tony Clarke" <cl*****@eircom .net> wrote in message
news:aE******** ***********@new s.indigo.ie...
The reason why I stuck with the Access database was beacuse it had al the info in it already. I was just really trying to patch the existing database
with PHP to generate reports (I'm not sure why they don't use the export
facility in Access...possib ly they don't know it exists!).
One of the reasons that I tried to redesign it was because

everyone
access's the database directly and uses the same VBA forms and as such the database constanly locks. Which means whoever is locking the database must save their record.

If I was designing it I would have used MySQL. Is there an easy way to
convert from an Access to MySQL database and would doing so yield a
significant performance increase?


There is no easy way to convert from Access to MySQL. You can use the
Upsizing Tool to convert to M$ $QL $erver.

You'd have to create all the tables in a MySQL database and redevelop all
their forms to use the new tables.

If the application is of significant business value then they really do

need to sanction a redevelopment of the system using more appropriate
technologies. That is the only way to guarantee performance.

Otherwise read my performance hints in the previous post.

Jul 17 '05 #6

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

Similar topics

49
14364
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
22
6293
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some good arguments on both sides, I would appreciate your points of view on the topic.
4
6414
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database to look a and I am loosing tremendious amounts of time trying to organize it so that I could view it. Regards, Alexandre Brisebois
18
1961
by: HYRY | last post by:
I want to join two mono wave file to a stereo wave file by only using the default python module. Here is my program, but it is much slower than the C version, so how can I increase the speed? I think the problem is at line #1, #2, #3. import wave import array lfile = wave.open(lfilename) rfile = wave.open(rfilename)
1
1503
by: Dan.Mandini | last post by:
I compiled the vb code of an .adp and ran it. The compiled code ran slower than the interpreted version?? How does that happen?? Is there any way I can increase speed of the adp?
3
2264
by: ARC | last post by:
Hello All, I have a major application for quoting and invoicing that is written in Access 97 (both front and back ends). I have a user base of over 300 customers, and currently I don't require that they have Access 97, as I use the access 97 runtime scripts from Sagekey software. The main problems I've seen with Access 97 are the built in e-mail support for sending reports. Unless a user uses the MS Outlook 2000/XP method, they have to...
14
2786
by: ARC | last post by:
Hello All, I have a major application for quoting and invoicing that is written in Access 97 (both front and back ends). I have a user base of over 300 customers, and currently I don't require that they have Access 97, as I use the access 97 runtime scripts from Sagekey software. The main problems I've seen with Access 97 are the built in e-mail support for sending reports. Unless a user uses the MS Outlook 2000/XP method, they have to...
1
1490
by: AliRezaGoogle | last post by:
Dear members I am working with a 2000 GH P4 Intel, and 512GB RAM. I have a long list matrix 3000 * 15,000 of type double. I have a calculation procedure which can be executed on any single element of the matrix. Regarding to nature of this procedure, it is possible to run procedure on every element independently. I designed 30 threads. Every thread runs same procedure on equal portion of the matrix. For example rows from 0 to 100 are...
10
11763
by: Devang | last post by:
Hello, I am using php script to upload file. some times if file size is too big(1GB) it takes too much time to upload. Can someone suggest me the way to increase upload speed. thanks
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9593
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 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...
1
10335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10088
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 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...
0
9169
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, 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...
0
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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 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.