I have a quick question concerning mysql. Is it better query based on the primary key or a field in the table? Does it really take up that much resources when querying a varchar field over a primary key? I see a lot of sites now that don't use IDs in their url for example, www.domain.com/content-title instead of www.domain.com/23
Numbers are almost always faster than varchars. Numbers are stored in less space so you get more keys on each index page in the database. As a result, you traverse fewer index pages to get to any individual key value.
Numbers are better but if you have an index on the column, then the speed can be acceptable. A lot of it depends on the total usage that you're expecting. A few thousand queries per day on a varchar or char table with an index is pretty much negligible. Also, using a front-end cache can reduce the load on the DB a lot.