我在 PostgreSQL 中有这个查询
SELECT numeric_value, entity_id
FROM data_value
WHERE
entity_id = 16029 OR
entity_id = 16026 OR
entity_id = 33768 AND
category_id = 158
对我来说重要的是数值,但我想以这种格式显示:
16029 | 16026 | 33768
value | value | value
value | value | value
这有可能吗?还是有效?因为我必须在一个非常慢的服务器上工作,并且我想尽可能地优化。