0.0004430
| Memory Before: 464.44 Kb
| Memory After: 481.3 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: No
SELECT p.call_name, p.php_code
FROM `plugin`
AS p
JOIN `product`
AS product
ON(p.product_id = product.product_id AND product.is_active = 1)
JOIN `plugin_hook`
AS ph
ON(ph.call_name = p.call_name AND ph.is_active = 1)
JOIN `module`
AS m
ON(m.module_id = p.module_id AND m.is_active = 1)
WHERE p.is_active = 1
ORDER BY p.ordering ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | | | | MISSING KEY | | | | | | no matching row in const table |
0.0002811
| Memory Before: 492.18 Kb
| Memory After: 509.05 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT time_stamp, time_update
FROM `photo`
WHERE photo_id = 6069
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | photo | | const | PRIMARY,photo_id,photo_id_2 | PRIMARY | 4 | const | 1 | 100.00 | |
0.0007980
| Memory Before: 551.62 Kb
| Memory After: 568.65 Kb
| Memory Used: 17.03 Kb
| Rows: 1
| Slave: Yes
SELECT f.friend_id
AS is_friend, u.user_id, u.profile_page_id, u.server_id
AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id, u.originality, u.last_activity, p.*, pi.*, pa.name
AS album_url, pa.name
AS album_title, pa.profile_id
AS album_profile_id, pt.item_id
AS is_viewed, lik.like_id
AS is_liked
FROM `photo`
AS p
LEFT JOIN `friend`
AS f
ON(f.user_id = p.user_id AND f.friend_user_id = 0)
JOIN `user`
AS u
ON(u.user_id = p.user_id)
LEFT JOIN `photo_info`
AS pi
ON(pi.photo_id = p.photo_id)
LEFT JOIN `photo_album`
AS pa
ON(pa.album_id = p.album_id)
LEFT JOIN `photo_track`
AS pt
ON(pt.item_id = p.photo_id AND pt.user_id = 0)
LEFT JOIN `like`
AS lik
ON(lik.type_id = 'photo' AND lik.item_id = p.photo_id AND lik.user_id = 0)
WHERE p.photo_id = 6069
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | p | | const | PRIMARY,photo_id,photo_id_2,user_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | f | | const | user_check,user_id,top_friend,friend_user_id | user_check | 8 | const,const | | 0.00 | unique row not found |
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pi | | const | photo_id | photo_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pa | | const | PRIMARY,album_id | PRIMARY | 4 | const | | 0.00 | unique row not found |
| 1 | SIMPLE | pt | | ref | item_id | item_id | 8 | const,const | 1 | 100.00 | Using index |
| 1 | SIMPLE | lik | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |
0.0005560
| Memory Before: 568.89 Kb
| Memory After: 585.77 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT p.*, pu.vanity_url, pg.name
AS category_name, pg.page_type, u.user_id
AS page_user_id, l.like_id
AS is_liked
FROM `pages`
AS p
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = p.page_id)
LEFT JOIN `pages_category`
AS pg
ON(pg.category_id = p.category_id)
LEFT JOIN `user`
AS u
ON(u.profile_page_id = p.page_id)
LEFT JOIN `like`
AS l
ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)
WHERE p.page_id = 156
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | pg | | system | PRIMARY,category_id | | | | | 0.00 | const row not found |
| 1 | SIMPLE | p | | const | PRIMARY,page_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | l | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |
0.0005622
| Memory Before: 568.94 Kb
| Memory After: 586.22 Kb
| Memory Used: 17.28 Kb
| Rows: 1
| Slave: Yes
SELECT p.*, u.user_image as image_path, p.image_path as pages_image_path, u.user_id as page_user_id, pc.claim_id, pu.vanity_url, pg.name
AS category_name, pg.page_type, u.full_name, l.like_id
AS is_liked, f.friend_id
AS is_friend, u2.user_id
AS owner_user_id, u2.profile_page_id
AS owner_profile_page_id, u2.server_id
AS owner_server_id, u2.user_name
AS owner_user_name, u2.full_name
AS owner_full_name, u2.gender
AS owner_gender, u2.user_image
AS owner_user_image, u2.is_invisible
AS owner_is_invisible, u2.user_group_id
AS owner_user_group_id, u2.language_id
AS owner_language_id, u2.originality
AS owner_originality, u2.last_activity
AS owner_last_activity
FROM `pages`
AS p
JOIN `user`
AS u
ON(u.profile_page_id = p.page_id)
JOIN `user`
AS u2
ON(u2.user_id = p.user_id)
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = p.page_id)
LEFT JOIN `pages_category`
AS pg
ON(pg.category_id = p.category_id)
LEFT JOIN `pages_claim`
AS pc
ON(pc.page_id = p.page_id AND pc.user_id = 0)
LEFT JOIN `like`
AS l
ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)
LEFT JOIN `friend`
AS f
ON(f.user_id = p.user_id AND f.friend_user_id = 0)
WHERE p.page_id = 156
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | pg | | system | PRIMARY,category_id | | | | | 0.00 | const row not found |
| 1 | SIMPLE | pc | | system | page_id | | | | | 0.00 | const row not found |
| 1 | SIMPLE | p | | const | PRIMARY,page_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u2 | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | l | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |
| 1 | SIMPLE | f | | const | user_check,user_id,top_friend,friend_user_id | user_check | 8 | const,const | 1 | 100.00 | Using where |
0.0003219
| Memory Before: 573.95 Kb
| Memory After: 591.06 Kb
| Memory Used: 17.11 Kb
| Rows: 15
| Slave: Yes
SELECT *
FROM `pages_perm`
WHERE page_id = 156
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | pages_perm | | ref | page_id | page_id | 4 | const | 13 | 100.00 | |
0.0004189
| Memory Before: 576.79 Kb
| Memory After: 593.66 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT p.*, pu.vanity_url, pg.name
AS category_name, pg.page_type, u.user_id
AS page_user_id, l.like_id
AS is_liked
FROM `pages`
AS p
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = p.page_id)
LEFT JOIN `pages_category`
AS pg
ON(pg.category_id = p.category_id)
LEFT JOIN `user`
AS u
ON(u.profile_page_id = p.page_id)
LEFT JOIN `like`
AS l
ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)
WHERE p.page_id = 156
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | pg | | system | PRIMARY,category_id | | | | | 0.00 | const row not found |
| 1 | SIMPLE | p | | const | PRIMARY,page_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | l | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |
0.0001872
| Memory Before: 580.18 Kb
| Memory After: 597.08 Kb
| Memory Used: 16.9 Kb
| Rows: 0
| Slave: Yes
SELECT *
FROM `user_blocked`
WHERE block_user_id = 0
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | user_blocked | | ALL | MISSING KEY | | | | 3 | 33.33 | Using where |
0.0001721
| Memory Before: 582.23 Kb
| Memory After: 599.13 Kb
| Memory Used: 16.9 Kb
| Rows: 0
| Slave: Yes
SELECT *
FROM `user_blocked`
WHERE block_user_id = 0
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | user_blocked | | ALL | MISSING KEY | | | | 3 | 33.33 | Using where |
0.0012140
| Memory Before: 597.43 Kb
| Memory After: 614.3 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT COUNT(*)
FROM `photo`
AS photo
JOIN `user`
AS u
ON(u.user_id = photo.user_id)
WHERE photo.photo_id > 6069 AND photo.module_id = 'pages' AND photo.group_id = 156 AND photo.user_id = 1275 AND ((photo.privacy = 0) AND photo.privacy = 0 AND photo.view_id = 0)
LIMIT 1
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | Using index |
| 1 | SIMPLE | photo | | index_merge | PRIMARY,photo_id,view_id_2,photo_id_2,view_id,privacy,view_id_3,view_id_5,user_id | view_id_5,user_id | 309,4 | | 1 | 29.55 | Using intersect(view_id_5,user_id); Using where |
0.0013559
| Memory Before: 598.48 Kb
| Memory After: 615.66 Kb
| Memory Used: 17.17 Kb
| Rows: 9
| Slave: Yes
SELECT photo.*
FROM `photo`
AS photo
JOIN `user`
AS u
ON(u.user_id = photo.user_id)
WHERE photo.photo_id > 6069 AND photo.module_id = 'pages' AND photo.group_id = 156 AND photo.user_id = 1275 AND ((photo.privacy = 0) AND photo.privacy = 0 AND photo.view_id = 0)
ORDER BY photo.photo_id ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | Using index; Using filesort |
| 1 | SIMPLE | photo | | index_merge | PRIMARY,photo_id,view_id_2,photo_id_2,view_id,privacy,view_id_3,view_id_5,user_id | view_id_5,user_id | 309,4 | | 1 | 29.55 | Using intersect(view_id_5,user_id); Using where |
0.0013320
| Memory Before: 601.44 Kb
| Memory After: 618.31 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT COUNT(*)
FROM `photo`
AS photo
JOIN `user`
AS u
ON(u.user_id = photo.user_id)
WHERE photo.photo_id < 6069 AND photo.module_id = 'pages' AND photo.group_id = 156 AND photo.user_id = 1275 AND ((photo.privacy = 0) AND photo.privacy = 0 AND photo.view_id = 0)
LIMIT 1
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | Using index |
| 1 | SIMPLE | photo | | index_merge | PRIMARY,photo_id,view_id_2,photo_id_2,view_id,privacy,view_id_3,view_id_5,user_id | view_id_5,user_id | 309,4 | | 1 | 51.89 | Using intersect(view_id_5,user_id); Using where |
0.0013731
| Memory Before: 602.52 Kb
| Memory After: 620.16 Kb
| Memory Used: 17.64 Kb
| Rows: 40
| Slave: Yes
SELECT photo.*
FROM `photo`
AS photo
JOIN `user`
AS u
ON(u.user_id = photo.user_id)
WHERE photo.photo_id < 6069 AND photo.module_id = 'pages' AND photo.group_id = 156 AND photo.user_id = 1275 AND ((photo.privacy = 0) AND photo.privacy = 0 AND photo.view_id = 0)
ORDER BY photo.photo_id
DESC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | Using index; Using filesort |
| 1 | SIMPLE | photo | | index_merge | PRIMARY,photo_id,view_id_2,photo_id_2,view_id,privacy,view_id_3,view_id_5,user_id | view_id_5,user_id | 309,4 | | 1 | 51.89 | Using intersect(view_id_5,user_id); Using where |
0.0002680
| Memory Before: 606.59 Kb
| Memory After: 623.45 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: Yes
SELECT p.user_id
AS photo_owner_id, pt.tag_id, pt.user_id
AS post_user_id, pt.content, pt.position_x, pt.position_y, pt.width, pt.height, u.user_id, u.profile_page_id, u.server_id
AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id, u.originality, u.last_activity
FROM `photo_tag`
AS pt
LEFT JOIN `user`
AS u
ON(u.user_id = pt.tag_user_id)
JOIN `photo`
AS p
ON(p.photo_id = pt.photo_id)
WHERE pt.photo_id = 6069
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | p | | const | PRIMARY,photo_id,photo_id_2 | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pt | | ref | photo_id,photo_id_2,photo_id_3,photo_id_4 | photo_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u | | eq_ref | PRIMARY,user_id | PRIMARY | 4 | danfa.pt.tag_user_id | 1 | 100.00 | |
0.0004339
| Memory Before: 612.92 Kb
| Memory After: 629.78 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id
AS module, m.url_value
AS url, mo.is_active
AS module_is_active, m.mobile_icon
FROM `menu`
AS m
JOIN `module`
AS mo
ON(mo.module_id = m.module_id AND mo.is_active = 1)
WHERE m.parent_id = 0 AND m.m_connection = 'photo.view' AND m.is_active = 1
GROUP BY m.menu_id, mo.module_id
ORDER BY m.ordering ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | m | | ref | m_connection,parent_id | m_connection | 229 | const,const | 1 | 88.57 | Using where; Using temporary; Using filesort |
| 1 | SIMPLE | mo | | ref | is_active,module_id,module_is_active | module_is_active | 303 | danfa.m.module_id,const | 3 | 100.00 | Using where; Using index |
0.0002799
| Memory Before: 614.04 Kb
| Memory After: 630.9 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id
AS module, m.url_value
AS url, mo.is_active
AS module_is_active, m.mobile_icon
FROM `menu`
AS m
JOIN `module`
AS mo
ON(mo.module_id = m.module_id AND mo.is_active = 1)
WHERE m.parent_id = 0 AND m.m_connection = 'photo' AND m.is_active = 1
GROUP BY m.menu_id, mo.module_id
ORDER BY m.ordering ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | m | | ref | m_connection,parent_id | m_connection | 229 | const,const | 1 | 88.57 | Using where; Using temporary; Using filesort |
| 1 | SIMPLE | mo | | ref | is_active,module_id,module_is_active | module_is_active | 303 | danfa.m.module_id,const | 3 | 100.00 | Using where; Using index |
0.0003250
| Memory Before: 615.09 Kb
| Memory After: 632.08 Kb
| Memory Used: 16.98 Kb
| Rows: 7
| Slave: No
SELECT m.menu_id, m.parent_id, m.m_connection, m.var_name, m.disallow_access, mo.module_id
AS module, m.url_value
AS url, mo.is_active
AS module_is_active
FROM `menu`
AS m
JOIN `module`
AS mo
ON(mo.module_id = m.module_id AND mo.is_active = 1)
WHERE m.parent_id > 0 AND m.is_active = 1
ORDER BY m.ordering ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | m | | range | parent_id | parent_id | 3 | | 8 | 10.00 | Using index condition; Using where; Using filesort |
| 1 | SIMPLE | mo | | ref | is_active,module_id,module_is_active | module_is_active | 303 | danfa.m.module_id,const | 3 | 100.00 | Using where; Using index |
0.0002649
| Memory Before: 626.27 Kb
| Memory After: 643.13 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: Yes
SELECT cd.item_id, cd.category_id, c.name
AS category_name, c.user_id, c.page, pu.vanity_url
FROM `category_data`
AS cd
JOIN `category`
AS c
ON(c.category_id = cd.category_id AND c.module = 'photo')
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = c.page)
WHERE cd.item_id IN(6069)
ORDER BY c.name ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | cd | | ref | item_id,category_id | item_id | 4 | const | 1 | 100.00 | Using temporary; Using filesort |
| 1 | SIMPLE | c | | eq_ref | PRIMARY,category_id | PRIMARY | 4 | danfa.cd.category_id | 1 | 10.00 | Using where |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | danfa.c.page | 12 | 100.00 | Using index condition |
0.0005801
| Memory Before: 628.25 Kb
| Memory After: 645.28 Kb
| Memory Used: 17.03 Kb
| Rows: 1
| Slave: Yes
SELECT f.friend_id
AS is_friend, u.user_id, u.profile_page_id, u.server_id
AS user_server_id, u.user_name, u.full_name, u.gender, u.user_image, u.is_invisible, u.user_group_id, u.language_id, u.originality, u.last_activity, p.*, pi.*, pa.name
AS album_url, pa.name
AS album_title, pa.profile_id
AS album_profile_id, pt.item_id
AS is_viewed, lik.like_id
AS is_liked
FROM `photo`
AS p
LEFT JOIN `friend`
AS f
ON(f.user_id = p.user_id AND f.friend_user_id = 0)
JOIN `user`
AS u
ON(u.user_id = p.user_id)
LEFT JOIN `photo_info`
AS pi
ON(pi.photo_id = p.photo_id)
LEFT JOIN `photo_album`
AS pa
ON(pa.album_id = p.album_id)
LEFT JOIN `photo_track`
AS pt
ON(pt.item_id = p.photo_id AND pt.user_id = 0)
LEFT JOIN `like`
AS lik
ON(lik.type_id = 'photo' AND lik.item_id = p.photo_id AND lik.user_id = 0)
WHERE p.photo_id = 6069
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | p | | const | PRIMARY,photo_id,photo_id_2,user_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | f | | const | user_check,user_id,top_friend,friend_user_id | user_check | 8 | const,const | | 0.00 | unique row not found |
| 1 | SIMPLE | u | | const | PRIMARY,user_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pi | | const | photo_id | photo_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pa | | const | PRIMARY,album_id | PRIMARY | 4 | const | | 0.00 | unique row not found |
| 1 | SIMPLE | pt | | ref | item_id | item_id | 8 | const,const | 1 | 100.00 | Using index |
| 1 | SIMPLE | lik | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |
0.0003719
| Memory Before: 787.95 Kb
| Memory After: 804.81 Kb
| Memory Used: 16.86 Kb
| Rows: 0
| Slave: Yes
SELECT cd.item_id, cd.category_id, c.name
AS category_name, c.user_id, c.page, pu.vanity_url
FROM `category_data`
AS cd
JOIN `category`
AS c
ON(c.category_id = cd.category_id AND c.module = 'photo')
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = c.page)
WHERE cd.item_id IN(6069)
ORDER BY c.name ASC
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | cd | | ref | item_id,category_id | item_id | 4 | const | 1 | 100.00 | Using temporary; Using filesort |
| 1 | SIMPLE | c | | eq_ref | PRIMARY,category_id | PRIMARY | 4 | danfa.cd.category_id | 1 | 10.00 | Using where |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | danfa.c.page | 12 | 100.00 | Using index condition |
0.0004969
| Memory Before: 797.91 Kb
| Memory After: 814.78 Kb
| Memory Used: 16.88 Kb
| Rows: 1
| Slave: Yes
SELECT p.*, pu.vanity_url, pg.name
AS category_name, pg.page_type, u.user_id
AS page_user_id, l.like_id
AS is_liked
FROM `pages`
AS p
LEFT JOIN `pages_url`
AS pu
ON(pu.page_id = p.page_id)
LEFT JOIN `pages_category`
AS pg
ON(pg.category_id = p.category_id)
LEFT JOIN `user`
AS u
ON(u.profile_page_id = p.page_id)
LEFT JOIN `like`
AS l
ON(l.type_id = 'pages' AND l.item_id = p.page_id AND l.user_id = 0)
WHERE p.page_id = 156
/* OO Query */
| Id | Select Type | Table | Partitions | Type | Possible Keys | Key | Key Len | Ref | Rows | Filtered | Extra |
|---|
| 1 | SIMPLE | pg | | system | PRIMARY,category_id | | | | | 0.00 | const row not found |
| 1 | SIMPLE | p | | const | PRIMARY,page_id | PRIMARY | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | pu | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | u | | ref | page_id | page_id | 4 | const | 1 | 100.00 | |
| 1 | SIMPLE | l | | ref | user_id,item_id,type_id | user_id | 4 | const | 1 | 100.00 | Using where |