Reply to Re: [MYSQL Newbie Question] - Polling records from table with added index

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация