I have 2 tables in teiid vdb table a and table b, for every row in table a the table b can contain one or multi rows, how to join these 2 tables such that for every record in table a there is one match from table b? if table b contains more than one row join should give any one single row.
currently i am writing it as but the performance is slow
select
(select e from b where b.source_file_name = a.source_file_name limit 1) e,
(select f from b where b.source_file_name = a.source_file_name limit 1) f,
(select g from b where b.source_file_name = a.source_file_name limit 1) g,
(select h from b where b.source_file_name = a.source_file_name limit 1) h,
a.*
from a where a.source_file_name = 'test'