orary; Using filesort'
>
> 1, 'PRIMARY', 'order_line', 'ref',
> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
>
SUBQUERY', '', '', '', '', '', '', , 'Select tables optimized away'
--
Is the performance of sql statement be increased?
From: Sebastian <[EMAIL PROTE
sing filesort'
>
> 1, 'PRIMARY', 'order_line', 'ref',
> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
>
> 2, '
rary; Using filesort'
1, 'PRIMARY', 'order_line', 'ref',
'PRIMARY,order_line_ol_i_id,order_line_ol_o_id,order_line_test',
'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
2, 'DEPENDENT SUBQ
In the mail,Pow give me a way.He advise me to build a index on
orders.o_id and orders.o_c_id.I understanding his mean is table orders join
table order_line using the index.Because orders.o_c_id be limited in the
where statemetn,so the index should be filter date before Join operation.In
this
王 旭 <[EMAIL PROTECTED]> wrote on 07/18/2005 03:12:28 AM:
> NO effect :-(
>
> >From: pow <[EMAIL PROTECTED]>
> >To: 王 旭 <[EMAIL PROTECTED]>
> >Subject: Re: optimize a sql statement
> >Date: Mon, 18 Jul 2005 11:51:23 +0800
> >
NO effect :-(
From: pow <[EMAIL PROTECTED]>
To: 王 旭 <[EMAIL PROTECTED]>
Subject: Re: optimize a sql statement
Date: Mon, 18 Jul 2005 11:51:23 +0800
Do u have composite index on order_line.ol_o_id AND order_line.ol_i_id?
You could try that...
王 旭 wrote:
> Now,I make this sql st
Now,I make this sql statement to easy.
Follow is the sql statement:
-
SELECT ol_i_id FROM orders,order_line
WHERE order_line.ol_o_id = orders.o_id
GROUP BY ol_i_id
-