Im working on a site where im dealing with a poorly put together database consisting of about 400,000 rows.
Everytime I make a call to the database, the PHP script maxes out its execution time (Set to 30 seconds) - When I refresh it works fine... Obviously this is kind of an issue when the site is put online (Currently, im working with it locally on WAMP)
I think part of the issue is for the main portion of the site, im having to issue 2 DB queries, 1 is for the results that are actually spit out, which are limited to 50 per a page, then a second one is queried to get the total number of rows that apply so I can page the results...
Is there anything I can do to speed up the calls? A sample call to the DB looks like this:
This actually gets the results that will be displayed:
SELECT DISTINCT `rname` FROM `realbiz` WHERE SUBSTRING(rname, 1, 1) = '$letterGet' LIMIT $offsetResults, $pageResults
This gets the total results to use for paging:
SELECT DISTINCT `rname` FROM `realbiz` WHERE SUBSTRING(rname,, 1, 1) = '$letterGet
Thanks...
Everytime I make a call to the database, the PHP script maxes out its execution time (Set to 30 seconds) - When I refresh it works fine... Obviously this is kind of an issue when the site is put online (Currently, im working with it locally on WAMP)
I think part of the issue is for the main portion of the site, im having to issue 2 DB queries, 1 is for the results that are actually spit out, which are limited to 50 per a page, then a second one is queried to get the total number of rows that apply so I can page the results...
Is there anything I can do to speed up the calls? A sample call to the DB looks like this:
This actually gets the results that will be displayed:
SELECT DISTINCT `rname` FROM `realbiz` WHERE SUBSTRING(rname, 1, 1) = '$letterGet' LIMIT $offsetResults, $pageResults
This gets the total results to use for paging:
SELECT DISTINCT `rname` FROM `realbiz` WHERE SUBSTRING(rname,, 1, 1) = '$letterGet
Thanks...