首页 > 解决方案 > Google Cloud PostgreSQL 的奇怪行为

问题描述

我正在运行 Google Cloud SQL 代理以连接到 Google Cloud (GCP) 上的远程 PostgreSQL (v9.6) 实例。

我对这两个查询返回的行数有一个非常奇怪的问题:

select "id", "original_image" 
from "tableA" 
where "image_id" is NULL 
order by "id" asc 
limit 581

返回0 行

select "id", "original_image" 
from "tableA" 
where "image_id" is NULL 
order by "id" asc 
limit 580

返回73 行

如果我删除 WHERE 子句 ( where "image_id" is NULL),则两者都返回限制金额(分别为 581 和 580)。

关于可能导致这种情况的任何想法?

标签: postgresqlgoogle-cloud-sqlpostgresql-9.6

解决方案


推荐阅读