On Mon, Jun 05, 2000 at 09:07:09AM -0700, John McNally wrote:
> I am not an expert at MySQL, but I think I remember someone saying that
> LIMIT does not really save you anything. The db just selects everything and
> then throws away the extra results. You can do this yourself and probably
> more intelligently.
This may well be true, but you are at least saving the socket traffic
and Java memory allocations.
> Where does the LIMIT constraint go in a SELECT?
It comes after 'ORDER BY'.
> There is a LargeSelect class, that I wrote as an example of how to handle
> large selects with BasePeer and Village.
This is clever code - well worth a read whether you'll use it or not.
Unfortunately I like you have no real world use for this so cannot help
test it. What a shame that the people who wanted it disappeared :-(
However as it happens the mm.mysql JDBC drivers for MySQL read
the whole resultset into memory immediately, and then ResultSet.next
just reads out of memory. This makes the architecture of the LargeSelect
class pretty much useless as it is on MySQL, unless it is modified
to use 'LIMIT' as well.
--
Sean Legassick
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]