Don't use the matched field in your queries. It is for Gmail internal use only!
When add, modifying or deleteing vfolders, don't forget to rebuild the matched index and recreate the MI values. This is essential if you have caching turned on.. (FIXME: put link to this part of help section)
Don't use the SQL 'ORDER BY' command. Gmail will add this automatically. The way to change the default order is to simply click on the clist title. You can only set the sort order globally, you can't set it differently for each vfolder.
The following principles should be applied:.
1. To get you data where you want it, change your view, not the data. Don't think of conventional email programs where you move the email around to different mailboxes, that sort of thinking is out. If you want a message to appear in a certain mailbox, improve your vfolder queries. A one off query improvement will save you work in the future.
2. Make vfolders for everything. This follows from principle #1. Your Inbox should be empty. If you can't make a vfolder to match the message, then delete it.
3. Design vfolders around topics, then sources. Use vfolders to group emails topically. For example, I use a vfolder that matches everything with the term 'gmail' into my gmail vfolder. That way I get to see all messages about gmail from the gmail mailing list, personal gmail email, and mentions of gmail from other mailing lists as well! (but the mailing list ones will still appear in the mailing list vfolder). After topics try and make vfolders around sources, like a mailing list. Never make a vfolder based on who it was sent to. eg: don't make vfolders based on your 3 different email addresses. It doesn't work.