0

I have a custom table inside my wordpress database called test.

What if i query this table using mysql_query() instead of using for example $wpdb->get_results()

Will this affect my performance?

Ty very much:)

2

Simple and short:

  • mysql_query() = Faster!
  • $wpdb->get_results() = Safer!

But in most cases since $wpdb is a global object and already in the memory using it will be be as fast as mysql_query().

Will this affect my performance?

It can affect for better performance changes but they would be minor changes that its just not worth it.

1

Plugins caching DB queries hook into the WordPress API. If you don’t use the API your queries aren’t cached. The result is a slower site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.