[wp-trac] [WordPress Trac] #27077: fix to avoid requery database for large result set via get_row
WordPress Trac
noreply at wordpress.org
Sun Feb 9 16:58:44 UTC 2014
#27077: fix to avoid requery database for large result set via get_row
-------------------------+--------------------------
Reporter: openadvent | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Database | Version: 3.8.1
Severity: normal | Resolution: invalid
Keywords: | Focuses: performance
-------------------------+--------------------------
Changes (by nacin):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Hi openadvent, thanks for the report. In the future, if you can submit a
patch formatted for SVN or Git, that would be great. There's more in the
[http://make.wordpress.org/core/handbook/ handbook].
This isn't something we're going to add to WordPress. If you're calling
the database API, there is an expectation that the query will run and
return the latest results. (Keep in mind, for example, other processes
could be making DB changes).
You should optimize your code to not unnecessarily run DB statements you
don't need. Rather than using get_row(), get_col(), or get_var() with
offsets, use get_results() and run through the results yourself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27077#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list