MySQL Forums
Forum List  »  Newbie

Re: union and missing limits
Posted by: M B
Date: April 09, 2010 01:06PM

Don't get me wrong :) I'm very grateful for your help!

Now it's working, kind of... different result than the query without inner limits.

I do not understand something, can you please explain to me?

Let's say there's 5000 of total records.

1. Inner selects are WITHOUT limits, outer has 50, so outer select will have 5000 rows where to choose the first 50 rows to display.

2. Both inner selects and outer has limit 50. Now outer select has only 100 rows from where to choose that 50 first rows.

Are those claims correct? If they are, that UNION with inner LIMITS are never going to show correct results...

Or (probably) I'm missing something...

Options: ReplyQuote


Subject
Written By
Posted
M B
March 27, 2010 04:49AM
March 27, 2010 10:35AM
M B
March 27, 2010 11:45AM
March 28, 2010 12:33PM
M B
March 28, 2010 02:53PM
M B
April 08, 2010 01:02AM
M B
April 08, 2010 01:41AM
April 08, 2010 07:51AM
M B
April 08, 2010 09:11AM
April 09, 2010 12:33AM
M B
April 09, 2010 03:59AM
April 09, 2010 09:42AM
Re: union and missing limits
M B
April 09, 2010 01:06PM
April 09, 2010 09:41PM
M B
April 12, 2010 03:48AM
April 08, 2010 07:56AM
April 08, 2010 08:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.