May 4, 2011

MySQL slow query | CyberSEO Pro | Support Forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Related Related Topics sp_TopicIcon
MySQL slow query
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
November 28, 2017
3:09 pm
Avatar
s.popadiin@gmail.com
Member
Members
Forum Posts: 32
Member Since:
May 11, 2017
sp_UserOfflineSmall Offline

Hello,

I received few notices from my hosting provider that I run plenty of slow queries like that:

# Query_time: 2.024816 Lock_time: 0.000051 Rows_sent: 5 Rows_examined: 341525 
use bmwshper_abcd; 
SET timestamp=1511332396; 
SELECT ID FROM wp_2_posts as posts, wp_2_postmeta as postmeta WHERE posts.ID = postmeta.post_id AND (((postmeta.meta_key = ‘cyberseo_post_name’ AND postmeta.meta_value = ‘in-the-news-altschool-to-close-elementary-school-in-manhattans-east-village-by-education-next’) OR (posts.post_name = ‘in-the-news-altschool-to-close-elementary-school-in-manhattans-east-village-by-education-next’)) OR (posts.guid = ‘Login to see this link)) AND posts.post_status NOT IN (‘trash’) AND posts.post_type NOT IN (‘attachment’, ‘revision’, ‘nav_menu_item’);

I suppose this is the duplicate post checking query. Is there a way to optimize this?

November 29, 2017
5:21 am
Avatar
CyberSEO
Admin
Forum Posts: 3676
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

No, there is no way to optimize it, because it’s already optimized. If you think you can, here is the source code:

Login to see the code

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 541

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 84

s.baryshev.aoasp: 64

Freedom: 61

MediFormatica: 49

B8europe: 47

saviulisse67: 45

Member Stats:

Guest Posters: 338

Members: 2635

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1535

Posts: 7754

Newest Members:

kevin.cooper.boonenewsmedia, florian.stickel, t.schleiser, worldnetsites, janodamek, socialbiz4themasses

Administrators: CyberSEO: 3676