> Is the table layout, indices, amount of data and ODBC connection the
> same in both cases? How long is ages? If minutes then is it a DNS
> problem in connecting to the server computer? You could try this by
> getting an item of data from a new table containing only one row.
> Do I understand correctly, you have an unordered array and you are
> comparing every element with every record (also unordered) from a
database?


On my localhost (My Work Station) it takes 2 seconds to run the same
search on the same Table...  And on the work place Server it takes
30+ seconds...  I think I have figured out the problem, it should be
to do with the fact that I am connecting to a Table on the Network
that is also being used by another Application (1st Place 95)...  And
at current 8 people are using this Application and constantly use
it during working hours...  I'll try the search at night and see if there
is a difference...

Thanks for the response...


> If so then I agree. I'd order the php array (either ascending or
> descending) and ask for the  database records similarly ordered (e.g.
> select myColumn from myTable order by myColumn). Then you only need make
> the comparisons until the value is lower (or higher) than the one it is
> being compared with. Make sure there is an index on myColumn in the
> database.
>

Sorting the Array will cost more time I think dependent on the
Sort Approach...  Creating the Array takes 1 or so secs...  I should
try and run it as a Script and set a timer...

Thanks again though...

Kondwani



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to