Re: optimize a sql statement

2005-07-28 Thread Gleb Paharenko
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' >

Re: optimize a sql statement

2005-07-22 Thread 王 旭
SUBQUERY', '', '', '', '', '', '', , 'Select tables optimized away' -- Is the performance of sql statement be increased? From: Sebastian <[EMAIL PROTE

Re: optimize a sql statement

2005-07-21 Thread Sebastian
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, '

Re: optimize a sql statement

2005-07-21 Thread 王 旭
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

Re: optimize a sql statement

2005-07-21 Thread 王 旭
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

Re: optimize a sql statement

2005-07-19 Thread SGreen
王 旭 <[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 > >

Re: optimize a sql statement

2005-07-18 Thread 王 旭
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

RE: optimize a sql statement

2005-07-17 Thread 王 旭
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 -