SQL directives

Started by Paul S., August 03, 2010, 03:12:22 PM

Previous topic - Next topic

Paul S.

Since Informix Dynamic Server 7.3X you have been able to use SQL directives like

SELECT {+INDEX(incident_details id_u1) AVOID_FULL(incident_details)}
id_case , id_in_case, id_status, id_reserve_amt
FROM incident_details
WHERE id_in_case  = g_in.in_case
AND   id_status   = l_id.id_status

This works fine using "dbaccess"

Two questions.
1. Can we use this format with Genero 2.XX
2. If the statement is PREPAREd does Genero check/changed anything or just pass the statement to the backend.

Thanks

Paul

Sebastien F.

Yes you can use optimizer hints with Dynamic SQL (PREPARE, EXECUTE IMMEDIATE).

However, with Static SQL, {} are treated as 4gl comments and are removed by fglcomp.

Try fglcomp -S to extract Static SQL statements.

Seb

Paul S.