Re: Searching a Paradox Table with my PHP Script...
| From: | Kondwani Spike Mkandawire | Date: | Thu, 11 Jul 2002 18:43:11 +0000 |
| Subject: | Re: Searching a Paradox Table with my PHP Script... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107211@lists.php.net to get a copy of this message | ||
> 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