Hi,
> why my some SQL 's take s alot of time.
Executing a view against a DBF table and running a SQL statement directly both take about the same time. If a SQL statement is slow, the corresponding view would be just as slow, and vice versa.
If a query takes a long time there are three common reasons:
- The query isn't optimized. You can use SYS(3054,12) to view optimization details.
- The result set is to big, like a SELECT * without a WHERE clause. The only solution here is to reduce the number of records you retrieve.
- The query contains calculation on a huge number of records. One possible approach is to calculate intermediate results in a trigger and query against the intermediate results instead of the original table.
Maybe you can post one example for a SQL statement that is slow?
--
Christof