Re: LEFT JOIN changes order of results

2005-06-03 Thread Scott Gifford
[EMAIL PROTECTED] writes: > You have a sort because you did an order by. > If you had an index with the desired order by, it may be used. > Try as you usage of covering indexes. Hi Mathias, Along with your suggestion, a little more thinking about the problem and some experimenting seems to have

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
You have a sort because you did an order by. If you had an index with the desired order by, it may be used. Try as you usage of covering indexes. you certainly know that one multi-column index is similar to a lot of multi-column others when desired columns are in the right position of columns used

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
you can also try to increase the value of the tmp_table_size variable. A+ Selon [EMAIL PROTECTED]: > You have a sort because you did an order by. > If you had an index with the desired order by, it may be used. > Try as you usage of covering indexes. > > you certainly know that one multi-column

Re: LEFT JOIN changes order of results

2005-06-02 Thread Scott Gifford
[EMAIL PROTECTED] writes: > hi, > mls_num is not in a key, have you tried index creation on (zip,price > desc,mls_num) ? Hi mathias, mls_num is the primary key, so it does have its own index. I could create a multi-column index covering (zip,price,mls_num), but that was really just one example

Re: LEFT JOIN changes order of results

2005-06-02 Thread mfatene
hi, mls_num is not in a key, have you tried index creation on (zip,price desc,mls_num) ? mathias Selon Scott Gifford <[EMAIL PROTECTED]>: > Johan Höök <[EMAIL PROTECTED]> writes: > > > Hi Scott, > > I think you've been lucky so far... > > As you're only ordering on listdate, which is the same >

Re: LEFT JOIN changes order of results

2005-06-01 Thread Scott Gifford
Johan Höök <[EMAIL PROTECTED]> writes: > Hi Scott, > I think you've been lucky so far... > As you're only ordering on listdate, which is the same > for both homes in your example you might definitely get different > results once you put in the limit. > A basic thing about rdb's is that you must ne

Re: LEFT JOIN changes order of results

2005-06-01 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Scott Gifford <[EMAIL PROTECTED]> writes: > The problem we're seeing is that when additional tables are pulled in > for the detailed view, the order is different from the summary view, > so the wrong homes are displayed. Here's a simplified example. A > summary qu

Re: LEFT JOIN changes order of results

2005-05-31 Thread Johan Höök
Hi Scott, I think you've been lucky so far... As you're only ordering on listdate, which is the same for both homes in your example you might definitely get different results once you put in the limit. A basic thing about rdb's is that you must never make assumptions that it returns resultsets in