Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41281, comment 11


Ignore:
Timestamp:
04/30/2021 01:17:01 PM (9 months ago)
Author:
homeworker
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41281, comment 11

    initial v1  
    1 I have the some problem, I have a website with 2.000.000 rows in wp_postmeta. If I select all rows it take 0.00002s, but with the query generated by attachment_url_to_postid from elementor it take 0.4s slowing the home generation up to 20s
     1I have the same problem, I have a website with 2.000.000 rows in wp_postmeta. If I select all rows it take 0.00002s, but with the query generated by attachment_url_to_postid from elementor it take 0.4s slowing the home generation up to 20s
    22
     3
     4{{{
    35SELECT post_id, meta_value
    46FROM wp_postmeta
    57WHERE meta_key = '_wp_attached_file'
    68AND meta_value = '2020/03/almo-nature.svg'
     9}}}
     10
    711
    812The problem is that this table is indexed for post_id, meta_vale and meta_key but NOT for meta_value that is used from this function.