For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > February 2007 > Re: [PHP-WIN] Search results









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] Search results
Armando

2007-02-01, 6:59 pm

I think before trying this you should take a closer look at your
database and query structure to determine what is causing a 45 to 50
second delay in getting the results. It may be that you just need to
optimize a bit. For instance, if you have a large number of columns and
are using select *, perhaps instead only select the columns you actually
need to display.

One of my web apps for part number searches takes a user's input, finds
all matching part numbers in Table A which has 42,000 rows, then takes
all of those Table A results and finds all the corresponding part
numbers in Table B that has 115,000 rows. This takes 3 seconds or less
depending on the number of results.

Some first things to check are how many rows are there in the table? You
say 1000's.. but even 100,000 really isn't all that many. How many
results are being returned on a typical user's query? Cheers.

Armando

Harpreet wrote:
> I have a search page on my web application that searches a database with
> 1000's of rows. The search results are returned in like 45-50 seconds.
> If the user goes to another page and then returns to the same page again
> it takes the same amount of time.
>
> Is there a way to use session variables to remember the search results
> and if user comes back to the page with the same criteria it shows the
> static results and not take as long.
>
> Help is needed urgent. Thanks
>
> Regards,
> Harpreet Kaur
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com