How can I see the execution plan for a given SELECT query? ie, the equivalent of EXPLAIN PLAN FOR SELECT... ?
Thanks,
Daniel Serodio
|
HXTT DBF will optimize select query, but it doesn't support EXPLAIN PLAN sql now. If you paste your select query, we will tell your the possible optimization result.
|
Is there some way to know at least if it's using an index or doing a full-table scan?
|
>Is there some way to know at least if it's using an index or doing a full-table scan?
No way. Many optimizations will be done for your sql. HXTT will check ON clause, where clause, having clause, and so on, to see where there're index expressions to be utilized. Left join, and right join will be converted into inner join if possible. Like operation will be converted into = coperation if possible. Or operation will be converted into In operation if possible. BETWEEN ... AND..., IN, ORDER BY, DISTINCT, LIKE operation can utilize index expressions. HXTT DBF uses automatic temporary index to quicken subquery sql and join sql. If you paste your sql, we will point out the possible optimization automatically by HXTT DBF.
|
Thanks for the information. If I have an index on "str(codigo,8)+str(semestre,1)", do I need to write "WHERE str(codigo,8)+str(semestre,1) = 123456781", or can I write "WHERE codigo=12345678 AND semestre=1" ? Can I write "WHERE semestre=1 AND codigo=12345678" ?
Thanks in advance,
Daniel Serodio
|
>WHERE str(codigo,8)+str(semestre,1) = 123456781",
Utilizes index.
>WHERE str(codigo,8)= 12345678",
Utilizes index.
>can I write "WHERE codigo=12345678 AND semestre=1" ?
> Can I write "WHERE semestre=1 AND codigo=12345678" ?
Doesn't utilizes index. You need an index on "codigo".
|