Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何优化 postgres 查询
我正在运行以下查询 SELECT fat FROM Table1 fat LEFT JOIN modo captura mc ON mc id fat modo captura id INNER JOIN loja lj ON lj id
sql
database
postgresql
postgresqlperformance
具有异构数据类型的 3 个字段的多列索引
我有一个包含 3 个字段的 postgres 表 a postgis几何 b 数组 varchar c 整数 我有一个涉及所有这些的查询 我想添加一个多列索引来加快速度 但我不能 因为这 3 个字段由于其性质而不能位于同一索引下 这种情况下
postgresql
Indexing
PostGIS
postgresqlperformance
autovacuum (VACUUM) 是这个 PostgreSQL UPDATE 查询偶尔需要几个小时才能完成运行的原因吗?
此 sql 查询通常只需要几分钟即可运行 update import parts ip set part manufacturer id pslc part manufacturer id from parts part supplier
postgresql
postgresqlperformance
vacuum
基于检查约束的分区修剪未按预期工作
为什么下面的查询计划中包含表 events 201504 根据我的查询和该表的检查约束 我希望查询规划器能够完全修剪它 database d events 201504 Table public events 201504 Column T
用 INSERT / UPDATE 的单个查询替换循环
我正在 PostgreSQL 中编写一个函数 它基本上执行 3 个步骤 从源表中获取一条记录 检查目标表中提取的记录的值 如果在目标表中找到记录 则使用提取的记录更新目标表的所有值 否则将提取的记录插入目标表 如果我写 而不是做这个循环单一
sql
postgresql
PLpgSQL
upsert
postgresqlperformance
Postgresql计数+排序性能
我使用 postgresql 和 psycopg2 构建了一个小型库存系统 一切都很好 除了当我想创建内容的聚合摘要 报告时 由于 count 和排序 我的性能非常糟糕 数据库架构如下 CREATE TABLE hosts id SERIA
sql
postgresql
Aggregate
postgresqlperformance
具有三个键的复合索引,如果我查询跳过中间一个会发生什么?
对于 PostgreSQL 我想在三列上使用复合索引A B C B is the created at日期时间 有时我可能会查询没有B 如果我复合索引会发生什么 A B C 但然后查询条件A and C 但不是B 那是 A and C但想要
postgresql
Indexing
postgresqlperformance
compoundindex
使用 && 连接 TSTZRANGE 时,Postgresql 9.4 查询会逐渐变慢
我正在运行一个查询 随着记录的添加 该查询会逐渐变慢 通过自动化过程 bash 调用 psql 连续添加记录 我想纠正这个瓶颈 但是 我不知道我最好的选择是什么 This is the output from pgBadger Hour C
sql
postgresql
databasedesign
postgresql94
postgresqlperformance
postgresql 中的临时表在所有客户端会话中都可见吗?
我想创建一个临时表 以便能够将其连接到几个表 因为将这些表与建议的临时表的内容连接起来需要花费大量时间 获取临时表的内容非常耗时 重复它一遍又一遍地花费越来越多的时间 当我的需求完成时 我将删除临时表 我想知道这些临时表是否在其他客户端会话
sql
performance
postgresql
join
postgresqlperformance
窗口函数过滤当前行
这是后续this https stackoverflow com questions 48000013 optimize slow aggregates in lateral join问题 我的查询被改进为使用窗口函数而不是内部的聚合LAT
sql
postgresql
windowfunctions
postgresqlperformance
Order BY 将 30ms 查询变成 7120ms 查询。已知的性能问题?
我有一个包含 1m 条记录的 User 表 User id fname lname deleted at guest 我有以下针对 postgres 9 1 数据库运行的查询 SELECT users FROM users WHERE us
sql
rubyonrails
rubyonrails3
postgresql
postgresqlperformance
查询 json / jsonb 列超级慢。我可以使用索引吗?
我正在尝试加快对 PostgreSQL 数据库中存储的一些 json 数据的查询速度 我继承了一个查询 PostgreSQL 表的应用程序 名为data有一个名为value其中 value 是 json 类型的 blobjsonb 它大约有
json
postgresql
jsonb
postgresqlperformance
准备好的语句中空 LIKE 的性能影响
我设置了一个 GiSTpg trgm http www postgresql org docs current interactive pgtrgm html上的索引name的栏目files table 准备好的语句的简化查询如下所示 SE
sql
postgresql
patternmatching
PreparedStatement
postgresqlperformance
对具有多个自联接的大型表执行缓慢的空间查询
我正在 Postgres 9 3 9 中的一个大表上进行查询 它是一个空间数据集 并且具有空间索引 比如说 我需要找到 3 种类型的物体 A B 和 C 标准是 B 和 C 都在 A 的一定距离内 比如 500 米 我的查询是这样的 sel
sql
postgresql
PostGIS
Spatial
postgresqlperformance
视图对聚合函数与结果集限制的性能影响
问题 Using PostgreSQL 13 我遇到了一个性能问题 根据我执行的 select 语句 从连接两个表的视图中选择最高 id 这是一个示例设置 CREATE TABLE test1 id BIGSERIAL PRIMARY KE
sql
postgresql
performance
sqlexecutionplan
postgresqlperformance
优化 Postgres 对时间戳范围的查询
我定义了下表和索引 CREATE TABLE ticket wid bigint NOT NULL DEFAULT nextval tickets id seq regclass eid bigint created timestamp w
使用数据类型“文本”存储字符串有什么缺点吗?
根据PostgreSQL 文档 它们支持 3 种字符数据数据类型 character varying n varchar n variable length with limit character n char n fixed lengt
sql
postgresql
types
postgresqlperformance
使用索引或位图索引扫描对时间戳进行高效的 PostgreSQL 查询?
在 PostgreSQL 中 我的日期字段上有一个索引tickets桌子 当我将领域与now 查询非常有效 explain analyze select count 1 as count from tickets where updated
sql
postgresql
Indexing
sqlexecutionplan
postgresqlperformance
如何让 date_part 查询命中索引?
我还没有能够让这个查询命中索引而不是执行完整扫描 我有另一个查询 它对几乎相同的表使用 date part day datelocal 该表的数据稍微少一些 但是相同的结构 并且将命中我在 datelocal 列上创建的索引 这是一个没有时
postgresql
Indexing
Aggregate
postgresqlperformance
每15分钟高效查询一个巨大的时间序列表一行
我有两张桌子 conttagtable t 和contfloattable 参见 T 大约有 43k 行 CF已经超过90亿了 我在两个表上创建了索引tagindex两个表上的列 该列可以被认为是一个唯一标识符conttagtable并作为
sql
postgresql
Aggregate
groupby
postgresqlperformance
1
2
»