{"id":22633,"date":"2026-12-04T08:00:00","date_gmt":"2026-12-04T07:00:00","guid":{"rendered":"https:\/\/webhosting.de\/?p=22633"},"modified":"2026-11-21T08:30:08","modified_gmt":"2026-11-21T07:30:08","slug":"wordpress-postmeta-under-load","status":"publish","type":"post","link":"https:\/\/webhosting.de\/en\/wordpress-postmeta-unter-last\/","title":{"rendered":"WordPress Post Meta Under Load: When the Classic Data Model Slows Things Down"},"content":{"rendered":"<div class=\"wh-article\" data-wh-layout=\"2.1.2\" style=\"width:100%;max-width:820px;margin:0 auto;color:#263b4b;font-family:inherit;font-size:18px;line-height:1.8;text-align:start;overflow-wrap:break-word;box-sizing:border-box\"><p class=\"wh-lead\" style=\"font-size:20px;line-height:1.7;color:#233746;margin:0 0 1.1em\">WordPress-Postmeta is a good choice if you want to load the custom fields of a specific post: The index at <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">post_id<\/code> restricts access. If, on the other hand, MySQL needs to find listings based on multiple metadata values and sort them by price, the core schema lacks an index on the price value. Whether this becomes a bottleneck is shown by the <strong style=\"font-weight:700;color:inherit\">Query plan for the SELECT statement that was actually executed<\/strong>, not just the size of the table. Check which rows MySQL has to read and sort before you add indexes or change the data model. <\/p>\n<nav class=\"wh-toc\" aria-label=\"Contents of this article\" style=\"display:block;margin:28px 0 38px;padding:22px;border:1px solid #d9e4e8;border-radius:14px;background:#f4f8f8\"><p class=\"wh-toc-title\" style=\"font-size:13px;font-weight:700;letter-spacing:.08em;color:#49656b;margin:0 0 14px\">Go directly to the section<\/p><div class=\"wh-toc-grid\" style=\"display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:10px\"><div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#zwei-zugriffsmuster\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Load additional fields or find relevant posts<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#postmeta-schema\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">What the Postmeta Schema Actually Indexes<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#meta-query-sql\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">How WordPress Translates Metafilter into SQL<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#mysql-plan-lesen\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Reading the MySQL query plan on a test copy<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#metadaten-vorladen\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Check for preloading on lists with known post IDs<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#massnahmen-vergleichen\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">A Comparison of Cache, Index, Taxonomy, and Lookup Table<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#last-und-messung\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Distinguishing Between Single-Event Latency and Frequent Queries<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#zusammengesetzten-index-pruefen\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">When a Composite Index Is Worth It<\/a><\/div>\n<div class=\"wh-toc-item\" style=\"display:block;min-width:0;margin:0;padding:0\"><a class=\"wh-toc-link\" href=\"#lookup-betreiben\" style=\"display:block;height:100%;padding:12px 15px;border:1px solid #dce6e8;border-radius:9px;background:#fff;color:#18575b;font-size:14px;line-height:1.5;font-weight:600;text-decoration:none;box-sizing:border-box\">Operate your own query schema on an ongoing basis<\/a><\/div>\n<\/div><\/nav><section class=\"wh-section\" aria-labelledby=\"zwei-zugriffsmuster\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"zwei-zugriffsmuster\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Load additional fields or find relevant posts<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">\u201eLoad the additional fields for post 123.\u201c A detail page already specifies which post is being displayed. The database can be accessed via the index at <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">post_id<\/code> go directly to the metadata lines for this post. Whether the page extracts a color, a subtitle, or multiple image credits from them does not change the starting point: The <strong style=\"font-weight:700;color:inherit\">The post ID is known<\/strong>. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">\u201eFind all offers between 50 and 100 euros that are available for pickup and can be delivered immediately, and sort them by price.\u201c If these three criteria are met in <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">wp_postmeta<\/code>, the matching post IDs are exactly what you're looking for. The query must check the values and match the conditions to the same post. Only then, based on the results, is the list sorted by price generated.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The difference is already evident in the types of questions an index can answer. On the detail page, the index based on the post ID limits access to the rows of a single post. In the offer search, the index can help distinguish price rows from other metadata based on the meta key. However, it does not reveal which of these price rows fall within the specified range. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A blanket row limit for WordPress post meta is therefore misleading. Even a large table can be well-suited for reloading data based on a known ID. Conversely, a search in a smaller table can be very time-consuming if the keys in question appear in many posts and the values must first be checked. The decisive factor is the <strong style=\"font-weight:700;color:inherit\">Access path of the specific query<\/strong>: Which rows can the database rule out from the start, and which ones does it need to check or sort through until it reaches a result?  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"postmeta-schema\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"postmeta-schema\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">What the Postmeta Schema Actually Indexes<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The Core schema from WordPress Tag 6.9 serves as a reference. The tag specifies the version to which the following information refers; it is neither a statement about the latest WordPress version nor an inventory of your installation. Additional indexes there may open up other access paths. For diagnostic purposes, therefore, the actual schema is what counts. <\/p>\n<div class=\"wh-table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Columns and Indexes of the `postmeta` Table in WordPress Core Version 6.9\" style=\"width:100%;max-width:100%;overflow-x:auto;margin:28px 0;border:1px solid #dce5e9;border-radius:14px;background:#fff;box-shadow:0 10px 28px -16px rgba(24,47,60,.32);box-sizing:border-box\"><table style=\"width:100%;min-width:580px;border-collapse:separate;border-spacing:0;border:0;margin:0;font-size:15px;line-height:1.6;background:#fff\"><caption style=\"padding:20px;text-align:start;font-size:17px;line-height:1.5;font-weight:700;color:#173246;background:#fff\">Columns and Indexes of the `postmeta` Table in WordPress Core Version 6.9<\/caption><thead><tr><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Column<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Function<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Index in Core<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Practical Implications<\/th><\/tr><\/thead><tbody><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">meta_id<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Identifier for a single metadata entry<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">primary key<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Identifies the row, not the subject-specific attribute of a post.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">post_id<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">ID of the related post<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Single Index<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Allows targeted access to metadata associated with a known post ID.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">meta_key<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Name of the Additional Field<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Prefix Index<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Can narrow down the search for a field name; the stored field value is not part of the index.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">meta_value<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Stored field value as LONGTEXT<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">No index<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">The Core schema does not provide direct index access to a price range or sorting by price.<\/td><\/tr><\/tbody><\/table><\/div><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The model saves <strong style=\"font-weight:700;color:inherit\">one line per metadata entry<\/strong>, not one column per additional field. For example, a plugin can assign a color to a post without adding a color column to the post table. If a shipping note is added later, a separate entry is created for it. Both fields use the same table structure, even though they are functionally unrelated. <\/p>\n<figure class=\"wp-block-image size-large wh-figure\" aria-describedby=\"wh-caption-detail1\" style=\"display:block;float:none;clear:both;width:100%;max-width:760px;margin:34px auto 40px;border:1px solid #dae5e9;border-radius:14px;overflow:hidden;background:#f5f8fa;box-shadow:0 10px 28px -17px rgba(24,47,60,.28);box-sizing:border-box\"><div class=\"wh-figure-media\" style=\"display:block;background:#eef3f5;line-height:0\"><img loading=\"lazy\" width=\"800\" height=\"534\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b-1024x683.webp\" class=\"wp-image-22680\" alt=\"AI-generated illustration of three metadata lines with custom line characters, two identical post tags, and field symbols\" decoding=\"async\" srcset=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b-1024x683.webp 1024w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b-300x200.webp 300w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b-768x512.webp 768w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b-18x12.webp 18w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-metadatenzeilen-d49995d7-detail1-8ca41a898b.webp 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" ><\/div><figcaption class=\"wh-caption\" id=\"wh-caption-detail1\" style=\"display:block;margin:0;padding:12px 18px 15px;border-top:1px solid #dce5e9;color:#506575;background:#f5f8fa;font-size:14px;line-height:1.55;text-align:start\">AI-generated illustration: Two different metadata entries can have the same post ID. The symbols in the third segment represent the field names.<\/figcaption><\/figure><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">This flexibility comes at the expense of specialization in individual assets. A price is in the same <strong style=\"font-weight:700;color:inherit\">generic text column<\/strong> such as a color name or a shipping note. The prefix index on <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">meta_key<\/code> Returns the beginning of the field name, not the field value. Although it helps locate the rows for the \u201ePrice\u201c key, it does not return them in numerical price order. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">In Core, the row ID is unique; it is not the combination of the post ID and the meta key. Two rows with the same key for the same post may therefore be intended\u2014for example, when a field contains multiple image credits. Whether such rows are actually erroneous duplicates is determined by the field\u2019s logic, not the table schema. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"meta-query-sql\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"meta-query-sql\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">How WordPress Translates Metafilter into SQL<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">WP_Meta_Query<\/code> provides the <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">JOIN<\/code>- and <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">WHERE<\/code>-Parts for Metafilter. In the sample listing, the price, pickup option, and delivery status may appear in different metadata rows. The links assign the relevant rows to the same post; the conditions determine which keys and values are used for the filter. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Read the <strong style=\"font-weight:700;color:inherit\">Table Links<\/strong> in the generated SQL, rather than treating the number of visible filters as the number of joins. In the sample query, track which table aliases appear in the conditions for pickup and delivery status, and through which join the respective rows are assigned to the item. This will show you which joins you need to examine in the query plan. In Tag 6.9, the Core checks before creating a new join whether a compatible condition already has a usable alias. Depending on the relation and comparison operators, conditions can therefore share the same join.   <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">When using the price filter, don't just check whether a <strong style=\"font-weight:700;color:inherit\">numerical comparison<\/strong> is created. WordPress 6.9 resolves <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">NUMERIC<\/code> to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">SIGNED<\/code> ; this is an integer type. For prices stored as decimal numbers, the comparison type must retain the necessary decimal places, for example by <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">DECIMAL<\/code> with explicitly appropriate precision and scaling. For integer amounts in the smallest currency unit, an integer comparison may be appropriate; first determine the stored representation. When performing a value comparison on a generated value, the core uses a resolved type that is not equal to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">CHAR<\/code> a <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">CAST<\/code> at <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">meta_value<\/code>, at <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">CHAR<\/code> No. This does not change either the text column or its indexing.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Check, compare, and sort separately: A numerical expression in <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">WHERE<\/code> doesn't yet say which expression in <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">ORDER BY<\/code> . When sorting by character, \u201e100\u201c comes before \u201e50,\u201c but numerically, 100 is larger. Therefore, check the complete SELECT statement to see what the sort is based on, and verify in the execution plan whether this requires an additional sort step. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"mysql-plan-lesen\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"mysql-plan-lesen\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Reading the MySQL query plan on a test copy<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">First, note which versions of WordPress and the database are installed, what the actual name of the postmeta table is, and which indexes it has. Then record the specific SELECT statement, including the filter values used, and associate it with the page view or background job that triggered it. The 6.9 core version shows the indexes of the reference schema, not the changes in your installation. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Run the following SQL examples on a representative test copy and adjust the table prefix. The first statement lists the existing indexes. The second shows the estimated <strong style=\"font-weight:700;color:inherit\">Query Plan<\/strong> for the fictional post ID 123 and the example key demo_color. It does not replicate either a complete WordPress query or the behavior of the Object Cache. <\/p>\n<div class=\"wh-code-window\" data-wh-code style=\"margin:28px 0 34px;border:1px solid #2c4656;border-radius:12px;overflow:hidden;background:#132a3b;box-shadow:0 9px 25px -13px rgba(15,35,55,.2)\"><div class=\"wh-code-toolbar\" style=\"display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:11px 16px;background:#223e50;color:#edf5fa;font-size:13px;line-height:1.5;font-weight:600\"><span>Code<\/span><button type=\"button\" class=\"wh-code-copy\" data-wh-copy hidden style=\"padding:6px 11px;border:1px solid #7893a1;border-radius:6px;background:transparent;color:#fff;font-size:12px;line-height:1.5;font-weight:600;cursor:pointer\">Copy code<\/button><span class=\"wh-copy-status\" aria-live=\"polite\"><\/span><span data-wh-copy-success hidden>Copied<\/span><span data-wh-copy-fallback hidden>Code highlighted\u2014please copy<\/span><\/div><pre class=\"wh-code\" data-no-translation translate=\"no\" style=\"display:block;margin:0;padding:20px;max-width:100%;overflow-x:auto;color:#edf5fa;background:#132a3b;font:14px\/1.75 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;direction:ltr;text-align:left\"><code class=\"language-sql\" style=\"font:inherit;color:inherit;background:transparent;padding:0;border:0;white-space:inherit\">SHOW INDEX FROM wp_postmeta;<\/code><\/pre><\/div><div class=\"wh-code-window\" data-wh-code style=\"margin:28px 0 34px;border:1px solid #2c4656;border-radius:12px;overflow:hidden;background:#132a3b;box-shadow:0 9px 25px -13px rgba(15,35,55,.2)\"><div class=\"wh-code-toolbar\" style=\"display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:11px 16px;background:#223e50;color:#edf5fa;font-size:13px;line-height:1.5;font-weight:600\"><span>Code<\/span><button type=\"button\" class=\"wh-code-copy\" data-wh-copy hidden style=\"padding:6px 11px;border:1px solid #7893a1;border-radius:6px;background:transparent;color:#fff;font-size:12px;line-height:1.5;font-weight:600;cursor:pointer\">Copy code<\/button><span class=\"wh-copy-status\" aria-live=\"polite\"><\/span><span data-wh-copy-success hidden>Copied<\/span><span data-wh-copy-fallback hidden>Code highlighted\u2014please copy<\/span><\/div><pre class=\"wh-code\" data-no-translation translate=\"no\" style=\"display:block;margin:0;padding:20px;max-width:100%;overflow-x:auto;color:#edf5fa;background:#132a3b;font:14px\/1.75 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;direction:ltr;text-align:left\"><code class=\"language-sql\" style=\"font:inherit;color:inherit;background:transparent;padding:0;border:0;white-space:inherit\">EXPLAIN FORMAT=TRADITIONAL SELECT meta_value FROM wp_postmeta WHERE post_id = 123 AND meta_key = &#039;demo_farbe&#039;;<\/code><\/pre><\/div><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The explicit format ensures that MySQL 8.4 outputs the plan in tabular form, regardless of the setting <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">explain_format<\/code>. Then, for the SELECT statement actually generated by WordPress, use <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">EXPLAIN FORMAT=TRADITIONAL<\/code>. This allows you to compare easy access with the full offer filter without assuming a specific standard format. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Read the columns for each table access <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">key<\/code> and <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">rows<\/code>: The first specifies the selected index, and the second estimates the number of rows to be checked. If it is in <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">Extra<\/code> the entry <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">Using filesort<\/code>, MySQL plans an additional sort step. The field descriptions can be found in the \u201eEXPLAIN Output Format\u201c section, which the MySQL 8.4 manual references in its description of EXPLAIN. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Do not confuse the estimate for a table access with the number of rows returned by the SELECT statement. A narrow and a broad price range can yield result pages of the same length if both display only a limited number of listings. Therefore, compare both plans. Iterations within an execution plan should be distinguished from the frequency of the entire SELECT statement in the page view. Do not apply the MySQL 8.4 output to MariaDB without verification. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"metadaten-vorladen\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"metadaten-vorladen\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Check for preloading on lists with known post IDs<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">The post ID is already specified on the detail page. The index on <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">post_id<\/code> matches this access. In the template, it reads <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">get_post_meta()<\/code> the post's metadata. When profiling, count the SQL queries that were actually executed, rather than assuming three database accesses based on three function calls for color, status, and pickup note.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If there are many individual metadata queries during rendering, test <strong style=\"font-weight:700;color:inherit\">Batch Preloading<\/strong> for the contribution IDs that have already been determined. In the standard process of <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">update_meta_cache()<\/code> In WordPress version 6.9, the function first checks the cache and only fetches the metadata from the database in a single batch for IDs that do not have a cache entry. If all IDs are present in the cache, this batch query is skipped. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Start with the entries whose additional fields the template actually needs. In the case of a paginated overview, for example, these are the visible listings, not all of the catalog\u2019s entries. Compare both the number of SQL queries and the memory usage for the same page view. If no additional metadata queries are generated during rendering, you can\u2019t save any more there.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A <a href=\"https:\/\/webhosting.de\/en\/redis-full-page-cache-wordpress-limitations-opportunities-performance\/\">Full-Page Cache for WordPress<\/a> It starts with the finished HTML page; if a hit is found, there is no need to render it again. Metadata preloading, on the other hand, aggregates cache misses for known IDs within the current session. The default object cache applies only to the current request. A persistent object cache can reuse suitable cache values across requests and avoid repeat read queries, provided valid entries are available. Neither preloading nor persistent caching changes the execution plan of an actually executed Metafilter SELECT. Therefore, check the number of avoided queries and the plan of the remaining SELECTs separately.   <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"massnahmen-vergleichen\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"massnahmen-vergleichen\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">A Comparison of Cache, Index, Taxonomy, and Lookup Table<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Choose the approach based on where the work occurs. If there are many metadata queries during rendering, the preload test described in the previous section is a good choice. If, on the other hand, the Metafilter SELECT already has to check many candidates, examine its <strong style=\"font-weight:700;color:inherit\">Access path<\/strong> directly: Can another index or data model reduce the number of candidates for this specific SELECT statement?  <\/p>\n<div class=\"wh-table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Diagnosis and Test Candidates for Four Postmeta Access Patterns\" style=\"width:100%;max-width:100%;overflow-x:auto;margin:28px 0;border:1px solid #dce5e9;border-radius:14px;background:#fff;box-shadow:0 10px 28px -16px rgba(24,47,60,.32);box-sizing:border-box\"><table style=\"width:100%;min-width:580px;border-collapse:separate;border-spacing:0;border:0;margin:0;font-size:15px;line-height:1.6;background:#fff\"><caption style=\"padding:20px;text-align:start;font-size:17px;line-height:1.5;font-weight:700;color:#173246;background:#fff\">Diagnosis and Test Candidates for Four Postmeta Access Patterns<\/caption><thead><tr><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Access pattern<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Diagnostic Findings<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">Smallest Practical Test<\/th><th scope=\"col\" style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#19394d;color:#fff\">What Else You Should Check<\/th><\/tr><\/thead><tbody><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Load additional fields for known post IDs<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Metadata queries occur repeatedly during rendering.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Perform the preload test described in the previous section using the required IDs.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Compare the number of queries and memory usage for the same page view.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Read repeatedly by post ID and key<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">The current access uses only some of the conditions.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Check a composite index on the test copy.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Take frequent write operations into account when performing comparisons.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Select offers by specific categories<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">The query searches for a term mapping in a metadata field.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Model the classification as a taxonomy and compare the filter.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#fff;color:#294252\">Take existing mappings and the filter change into account.<\/td><\/tr><tr><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Frequently filter by price range and sort by price<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">The plan processes many price lines.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Test a lookup table with a numeric price column as a test variant.<\/td><td style=\"padding:15px 18px;border:0;border-bottom:1px solid #e2e9ed;text-align:start;vertical-align:top;white-space:normal;font-size:15px;line-height:1.6;background:#f4f7f9;color:#294252\">Plan for synchronizing changes and rebuilding.<\/td><\/tr><\/tbody><\/table><\/div><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If \u201ePickup\u201c is a fixed offer category, the offer can be linked to the term of the same name in a <strong style=\"font-weight:700;color:inherit\">Taxonomy<\/strong> assign. The query can use the concept relationships defined in the WordPress schema instead of comparing a stored meta value. You can check whether this is worthwhile by looking at the modified SELECT statement. If almost every listing is assigned to this category, the condition hardly narrows down the selection at all.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A price range such as 80 to 120 euros, on the other hand, is not a fixed definition. The boundaries change as the search progresses, and within the range, 85 euros should come before 110 euros. To test this, try a schema with a numeric price column and compare how the complete SELECT statement, combined with the other filters, evaluates the range and generates the order. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If the price has so far only appeared on detail pages, that alone does not justify adding a second table. The situation is different if many catalog lookups trigger the same expensive range lookup. In that case, compare the current plan with the new approach for broad and narrow price ranges. Weigh the benefits against the effort required to keep the additional table up to date when prices change. <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"last-und-messung\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"last-und-messung\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Distinguishing Between Single-Event Latency and Frequent Queries<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If the list of offers isn't posted until late, the first thing you'll be interested in is the <strong style=\"font-weight:700;color:inherit\">Single-shot latency<\/strong>: How much of the wait time is attributable to the specific SELECT statement? In an import job, on the other hand, a metadata query that seems unremarkable on its own can consume a significant amount of database time due to constant repetition. Therefore, track the runtime and number of calls per page view or job. The article on <a href=\"https:\/\/webhosting.de\/en\/why-wordpress-cronjobs-fail-under-load-causes-solutions-cron\/\">WordPress Cron Jobs Under Load<\/a>.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">In MySQL 8.4, first compare the estimates from <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">EXPLAIN FORMAT=TRADITIONAL<\/code> using the runtime data from <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">EXPLAIN ANALYZE FORMAT=TREE<\/code>. The first call returns the tabular estimate; the second explicitly specifies the tree format so that the runtime analysis works even if the `explain_format` setting differs. EXPLAIN ANALYZE actually executes the statement and displays the observed rows, time statistics, and the number of loops for each iterator. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">These loops count the number of times an iterator is repeated within a single execution, not the number of SQL calls per page view or job. You can determine their frequency by profiling the actual execution. Consider rows and loops together: An access operation that returns only a few rows per pass can cause a lot of work if a join triggers it again for many outer rows. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><strong style=\"font-weight:700;color:inherit\">Warning:<\/strong> Use <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">EXPLAIN ANALYZE FORMAT=TREE<\/code> For this diagnosis, use only read-only queries on a representative test copy. Even a SELECT statement can consume significant resources. Use the same filters and a metadata distribution as similar as possible to that of the problematic query. While a small copy with just a few demo listings demonstrates how the system works, it does not allow for a reliable prediction of production latency under concurrent load. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Do not confuse the result set with the set of candidates that were evaluated. A page with twenty hits may not be determined until after several joins and a sort. Similarly, an index on a very common meta-key may return many rows, even though it is used as planned. The total size of the table therefore does not indicate how expensive this particular query is. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Derive the appropriate action from this difference: If the job repeatedly performs the same access operation, first check whether it can reuse results or load known entries in batches. If, on the other hand, a single catalog filter accounts for the majority of the wait time, look in the execution plan for the step that processes many candidates. Fewer calls help the job, but they do not make the individual filter more efficient.<\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"zusammengesetzten-index-pruefen\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"zusammengesetzten-index-pruefen\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">When a Composite Index Is Worth It<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">A <strong style=\"font-weight:700;color:inherit\">composite index<\/strong> is a candidate for testing if frequent queries specify both the post ID and the meta key, and the existing access method must check many candidates. The core schema contains separate indexes for both columns. If a post has only a few meta rows anyway, first check whether accessing it by post ID already narrows down the problem sufficiently.  <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Which queries can additionally benefit from the index depends on the <strong style=\"font-weight:700;color:inherit\">left index prefix<\/strong> ... According to the rule in the MySQL 8.4 Manual, under the section \u201eMultiple-Column Indexes,\u201c it is possible to <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">(post_id, meta_key)<\/code> can also be used to search by post ID alone; when <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">(meta_key, post_id)<\/code> Instead, the meta key is the leading column. This describes a possible search access, not the guaranteed index selection. Therefore, in addition to the SELECT statement with both equality conditions, also check the frequent queries with only one condition. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Before performing the comparison, check the actual schema, including the indexed prefix length of <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">meta_key<\/code>. The validated Core tag indexes only the beginning of the key in a separate key index. Two field names that differ only after this beginning have the same indexed text beginning. Therefore, do not derive the definition of an additional index solely from the Core schema. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Compare the same representative SELECT statements on the test copy before and after the change. Check whether MySQL actually uses the new index, whether fewer rows are processed, and whether the execution time decreases under comparable conditions. Also include frequent write operations in your test. A more efficient execution plan for a rare query alone is not yet a reason to change the production schema. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">For the catalog, another question is crucial: Can the tested access filter by numerical price and return the desired order? The core schema stores <code data-no-translation style=\"font:600 .87em\/1.5 ui-monospace,monospace;color:#235063;background:#edf3f5;border-radius:4px;padding:.1em .3em\">meta_value<\/code> as non-indexed text. For the price filter, do not assume that an index on the beginning of a text string serves the same purpose as a typed price column. Instead, compare the query to accessing the numeric schema.  <\/p>\n<\/section><section class=\"wh-section\" aria-labelledby=\"lookup-betreiben\" style=\"display:block;margin:0 0 36px;min-width:0\"><h2 id=\"lookup-betreiben\" style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Operate your own query schema on an ongoing basis<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">If the catalog frequently filters by price range and sorts by price, test a <strong style=\"font-weight:700;color:inherit\">Standardized lookup table<\/strong>. To ensure a unique search price for each listing, it can maintain a row containing the listing ID and a numeric price. Check the complete SELECT statement to see if a price index is selected for the range query and whether the remaining filters and joins require an additional sort step. <\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">First, place the <strong style=\"font-weight:700;color:inherit\">primary data source<\/strong> fixed. If the price remains in the meta storage for compatibility reasons, the lookup table is a derivation and not a second location where editors can change prices. Also define what happens when price values are missing or duplicated. The post meta schema does not enforce a unique value per post and key; therefore, the derivation requires a business rule to determine which price appears in search results. <\/p>\n<figure class=\"wp-block-image size-large wh-figure\" aria-describedby=\"wh-caption-detail2\" style=\"display:block;float:none;clear:both;width:100%;max-width:760px;margin:34px auto 40px;border:1px solid #dae5e9;border-radius:14px;overflow:hidden;background:#f5f8fa;box-shadow:0 10px 28px -17px rgba(24,47,60,.28);box-sizing:border-box\"><div class=\"wh-figure-media\" style=\"display:block;background:#eef3f5;line-height:0\"><img loading=\"lazy\" width=\"800\" height=\"534\" src=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4-1024x683.webp\" class=\"wp-image-22681\" alt=\"AI-generated illustration of a product display area and a separate bar with price cylinders arranged in ascending order\" decoding=\"async\" srcset=\"https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4-1024x683.webp 1024w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4-300x200.webp 300w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4-768x512.webp 768w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4-18x12.webp 18w, https:\/\/webhosting.de\/wp-content\/uploads\/2026\/11\/postmeta-lookup-preisbereich-d49995d7-detail2-f9b2bd40c4.webp 1536w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" ><\/div><figcaption class=\"wh-caption\" id=\"wh-caption-detail2\" style=\"display:block;margin:0;padding:12px 18px 15px;border-top:1px solid #dce5e9;color:#506575;background:#f5f8fa;font-size:14px;line-height:1.55;text-align:start\">AI-generated illustration: A derived lookup table stores lookup values separately from the underlying data source for range queries.<\/figcaption><\/figure><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Plan for changes to be reflected across all relevant data flows, not just when saving in the editor. Imports, price changes resulting from background jobs, and deletions must also be reflected in the search view. Determine whether the update must occur immediately or whether a delayed synchronization is acceptable. In the latter case, the detail page and the search results list may temporarily display different prices.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">For the rebuild, you need a process that regenerates the derived rows from the relevant source without changing the prices in the source. Determine how you will identify missing or outdated rows and how changes will be reflected during the rebuild. Before releasing the new search data, check not only the number of entries but also any noticeable price discrepancies.<\/p>\n<p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">With High-Performance Order Storage (HPOS), WooCommerce demonstrates what a domain-specific schema can look like: Orders are assigned their own tables and indexes, and extensions must support the order storage. HPOS is not a solution for product filters or arbitrary WordPress metadata. The same trade-off is crucial for your lookup table: The additional schema is only worth the effort if the measured benefit for the relevant queries justifies the overhead of synchronization, compatibility, and reconstruction. <\/p>\n<\/section><section class=\"wh-sources\" style=\"margin:40px 0 0;padding:24px 0 0;border-top:1px solid #dce5e9;color:#596b7b;font-size:14px;line-height:1.65\"><h2 style=\"margin:38px 0 18px;color:#172f41;font-size:clamp(24px,1.25rem + 1vw,30px);font-weight:700;line-height:1.3;scroll-margin-top:115px\">Sources and Current State of Knowledge<\/h2><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Status of the research: <time datetime=\"2026-11-20\">2026-11-20<\/time><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\">Research status: November 20, 2026. The WordPress Tag 6.9 serves as a reference for the core schema; it does not indicate the latest version or the schema of every installation. For Metafilter, the SQL actually generated is authoritative. The plan analysis is based on MySQL 8.4 and cannot be applied to MariaDB without verification.<\/p><div class=\"wh-source-urls\"><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/raw.githubusercontent.com\/WordPress\/WordPress\/6.9\/wp-admin\/includes\/schema.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/explain.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/developer.wordpress.org\/reference\/classes\/wp_meta_query\/get_sql\/<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/raw.githubusercontent.com\/WordPress\/WordPress\/6.9\/wp-includes\/class-wp-meta-query.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/developer.wordpress.org\/reference\/functions\/get_post_meta\/<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/raw.githubusercontent.com\/WordPress\/WordPress\/6.9\/wp-includes\/meta.php<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/developer.wordpress.org\/reference\/classes\/wp_object_cache\/<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/multiple-column-indexes.html<\/span><\/p><p style=\"margin:0 0 1.1em;font-size:inherit;line-height:inherit\"><span class=\"wh-source-url\" data-no-translation dir=\"ltr\" style=\"overflow-wrap:anywhere;font:12px\/1.6 ui-monospace,monospace;direction:ltr\">https:\/\/woocommerce.com\/document\/high-performance-order-storage\/<\/span><\/p><\/div><\/section><\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress post meta works well for adding custom fields to existing posts. It can become costly if MySQL first has to find posts based on multiple meta values and then sort them by price. The query plan shows where it\u2019s worth making adjustments.<\/p>","protected":false},"author":1,"featured_media":22678,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[733],"tags":[],"class_list":["post-22633","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/comments?post=22633"}],"version-history":[{"count":9,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22633\/revisions"}],"predecessor-version":[{"id":22682,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/posts\/22633\/revisions\/22682"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/media\/22678"}],"wp:attachment":[{"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/media?parent=22633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/categories?post=22633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhosting.de\/en\/wp-json\/wp\/v2\/tags?post=22633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}