Subject Re: [firebird-php] Re: ORDER By RAND() executes very slow
Author Lester Caine
bdwankhede wrote:
> Many thanks for response.
>
> I have to run a CLI php script on 1000 random rows which search for any specific words in the table fields and i have to replace these words with another one and we have to run this script weekly or monthly as new records stored into the table having large no of records

It would probably be quicker simply to generate a random id number and check
that single record. And run that 'script' 1000 times. You can add a field for
'done' and skip any records that you have already processed ... until you have
processed enough.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php