连接string: 
"Provider=MSDAORA.1;Password=123;User ID=test;Data Source=test;Persist Security Info=True" 
SQL语句:
conn.Command_text = "select a.*,b.* from MAT_DFT_MASTER a ,MAT_DFT_DETAIL b where a.header_id=b.header_id(+) and a.ser_part_id like '" & Text2.Text & "%' and a.test_date between to_date('" & DT1 & "','yyyy-mm-dd hh24:mi:ss') and to_date('" & DT2 & "','yyyy-mm-dd HH24:MI:SS') and a.tester=?"
其中表MAT_DFT_MASTER设了Indexes: PK(header_id),UK(ser_part_id,test_date)。
而表MAT_DFT_DETAIL没有Indexes
现在MAT_DFT_DETAIL中有300万条记录,用此查询很慢,有时慢得像电脑死机!!!
请问(从VB代码或Oracle库本身)怎么优化?