A
A
abbasfatullaev2014-07-02 11:31:08
MySQL
abbasfatullaev, 2014-07-02 11:31:08

What does this request do?

SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id
I was told that it exceeded the number of database queries.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Solomonov, 2014-07-02
@Wendor

Selects all blog posts along with metadata from the database.

A
Alex Kheben, 2014-07-02
@zBit

Maybe it makes sense to somehow limit it?

A
Alexey Kulakov, 2014-07-02
@carbon88

There was a similar situation. We had such a situation due to the fact that the request shoveled a bunch of records. Check how many records this query iterates over with Explain.
Just write the word Explain before the request.
For example via PhpMyAdmin. And the server will give you statistics on request.
indexes on certain columns helped us

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question