Subject | Re: [firebird-support] Query plan |
---|---|
Author | Anderson Farias |
Post date | 2007-09-06T18:39:51Z |
Hi,
From: "rapdirector"
have any 'where' condition than at least 1 of the tables will have all
records readen (natural) and you can choose "what" of them (probably
choosing the one with least records is better) by using LEFT JOIN, eg:
SELECT <field_list>
FROM BEFIZETES_TORZS BT
left join PARTNER_TORZS PT on BT.P_KOD=PT.P_KOD
left join TARSULAT_TORZS TT on PT.TARSULAT_KOD=TT.TARSULAT_KOD
ORDER BY BT.DATUM
Regards,
Anderson
From: "rapdirector"
>What can I do for using the appropriate index in the mentionedyou can start by writing your SQL joins on a 'modern' way. As you do not
>situation? Do I have to provide my own plan?
have any 'where' condition than at least 1 of the tables will have all
records readen (natural) and you can choose "what" of them (probably
choosing the one with least records is better) by using LEFT JOIN, eg:
SELECT <field_list>
FROM BEFIZETES_TORZS BT
left join PARTNER_TORZS PT on BT.P_KOD=PT.P_KOD
left join TARSULAT_TORZS TT on PT.TARSULAT_KOD=TT.TARSULAT_KOD
ORDER BY BT.DATUM
Regards,
Anderson