|
Posted by Don Khuth on 04/12/06 07:41
<endlesstide@gmail.com> wrote in message
news:1144814965.826469.104040@g10g2000cwb.googlegroups.com...
>
> QUESTION: What is the most efficient query to select any 50 records,
> and sort them by Value ascending? Someone said I needed to add a
> Index, which I did for the Value field. What does Cardinality mean?
SELECT * FROM tablename ORDER BY value ASC LIMIT x, 50
This statement will select everything from the table, sort it by value in
ascending order, 'x' represents the dynamic starting point and 50 will
select the next 50 records. This should work with/without an index.
Navigation:
[Reply to this message]
|