[thelist] Big drop-down lists.

Bill Moseley moseley at hank.org
Tue Sep 7 22:06:08 CDT 2010

Working on a few new pages and the designers want to provide users with a
drop-down box to select from a list of items.  The vast majority of current
users have just a handful of items to select from -- most less than 100.
 Moving to testing we find out that a very small number of users have a huge
number of items -- some have a 100,000+ items.

Obviously, populating the list with AJAX request is the correct approach to
prevent transfer huge amount of data to the client.  But, there's no real
point of providing a list that someone can scroll though for thousands and
thousands of rows.  Who's going to do that?

I realize this is a somewhat open-ended question, not to mention short on
specifics, but how do you handle a situation like this where the design
calls for a drop-down for 99% of the users, but for 1% it's just
not feasible and you don't know there's too many until you query the

Would you do a count(*) first and then if over some number just offer up,
say, an ajax search box?  Even then a search might pull up too many.

Just run the query to select the list but use a LIMIT and if over some
"reasonable" length of a list add a "See more..." to the bottom of the list
that goes to a page that's better designed for managing that many rows?

If there's a natural order then just LIMIT to some number and say/document
that only displays 100(?) most recent items?

Sure, we will look at the database to see what performs well, but I'm just
curious if you have a general approach to this kind of issue.

Bill Moseley
moseley at hank.org

More information about the thelist mailing list