Is get_option() faster than accessing get_transient()?
Today I run a test over my db to explore the speed difference between accessing a key from options, custom table & transients. I ran the test for 1000 times and following is the time taken to run 1000 get operations:
get_transient()
0.0245 secondsget_option()
0.0068 seconds- simple select operation from Custom Table 0.65 seconds
I also checked that transient was not expired during this test. So the question is, is get_option()
faster than get_transient()
or did I mess up something in my test? Is custom table delay due to options being cached default by WordPress? Also, is options also cached by different caching plugins like the transients?
Leave an answer