| Subject | ORDER By RAND() executes very slow | 
|---|---|
| Author | bdwankhede | 
| Post date | 2010-05-04T04:24:07Z | 
Hello all, 
I have a simple firebird sql query as
SELECT FIRST 1000 a."id", a."what_they_do", a."does", a."improves"
FROM "inspections" a ORDER BY RAND() ASC;
where "inspections" table having large no of records and containing text fields but by using ORDER BY RAND() it executes very slow
please help ... how can i improve this query to get random records?
            I have a simple firebird sql query as
SELECT FIRST 1000 a."id", a."what_they_do", a."does", a."improves"
FROM "inspections" a ORDER BY RAND() ASC;
where "inspections" table having large no of records and containing text fields but by using ORDER BY RAND() it executes very slow
please help ... how can i improve this query to get random records?