[wp-trac] [WordPress Trac] #60950: JSON serialization for meta values
WordPress Trac
noreply at wordpress.org
Thu Apr 25 11:47:59 UTC 2024
#60950: JSON serialization for meta values
--------------------------------+------------------------------
Reporter: inf3rno | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------------+------------------------------
Comment (by smirnov20):
When we talk about complex meta values like arrays, it means that we have
data organized in a structured way, but it's tricky to work with them in
databases. Currently, if we want to search or compare these complex
values, we have to unpack them, which can be inefficient.
JSON serialization would help because databases like MySQL support
functions specifically for working with JSON data. These functions allow
us to search, compare, and perform other operations directly on the JSON
data without needing to unpack it first.
Without JSON serialization, we're left with less efficient options like
comparing data in PHP, which requires more resources, or splitting the
data into separate pieces in the database, which can make the database
bigger.
Some people even resort to a messy workaround where they search through
the PHP serialized form of the data using a LIKE comparator, which is not
ideal.
So, having JSON serialization would make it much easier and more efficient
to work with complex data in databases, and it seems like a feature that a
lot of people really need.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60950#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list