AJAX wp-mysql running too slow

When you call the database directly rather then using the $wpdb object its faster for a simple reason which is you only call the database, and the when you use $wpdb it loads extra functions and basically most of WordPress before you can use the $wpdb object. What you should try is to use the … Read more

Add some fileds to the wp_posts table

The second approach (joining additional table) is better for several reasons. When plugin is not active, you won’t retrieve it’s data (or with other words, you won’t select additional data unless you explicitly join it) It’s more maintainable. You can alter your plugin table without altering posts table and vice versa. The join most likely … Read more