Hi!

>>>>> "Emmanuel" == Emmanuel van der Meulen <[EMAIL PROTECTED]> writes:

Emmanuel> Hello Mark,
Emmanuel> Thank you for the note and feedback.  BTW, it was not over a network.  Both
Emmanuel> on local PC.  So all the time went into building the resultset in memory.
Emmanuel> I'm surprised at the time that takes.

Emmanuel> Further to why I'm desirous to do this query, twofold.  One I get the record
Emmanuel> count (rows in the table); since realised there are other ways to get he
Emmanuel> number of rows.  For the second requirement I cannot see an alternative.
Emmanuel> Not on this table, but on another where I keep a timestamp, I'd like to get
Emmanuel> the 50 most recent inserts.  So what I do is; (SELECT * FROM
Emmanuel> MEMBERSHIPSTRACKING ORDER BY ACTIVITYTIMESTAMP DESC) thus get all the rows,
Emmanuel> ordered desc on timestamp and then I have the most recent 50 inserts.  If
Emmanuel> anyone could assist me with this, I'd use other means, rather than
Emmanuel> retrieving the full resultset.

Why can't you use 'LIMIT 50' to get the latest 50 rows ?
(As Mark asked, why do you have to use LIMIT 10000)

You can also use SQL_CALC_FOUND_ROW option to avoid to do two queries,
if you want to know how many rows the WHERE statement actually matched
(see the MySQL manual for more information about this topic).

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
       <___/   www.mysql.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to