PostgreSQL
数据库
通过自然对话查询、优化和管理您的 PostgreSQL 数据库——由 OpenClaw 和 Neotask 驱动。
- 通过描述所需数据来编写并执行 SQL 查询,无需手动构建 SQL
- 通过引导式性能分析诊断慢查询、缺失索引和表膨胀
- 通过带安全确认的对话命令管理架构、角色和扩展
你能做什么
用简单的英语查询数据
描述您需要的数据,Neotask 写入并针对您的 PostgreSQL 数据库运行 SQL 查询。无论是简单的查找、多表联接,还是使用窗口函数的聚合,您无需自己编写 SQL 即可获得结果。
分析查询性能
粘贴缓慢的查询或描述性能问题,并要求 Neotask 运行 EXPLAIN ANALYZE,解释查询计划,识别瓶颈,并建议可以修复它的特定索引或查询重写。
监控数据库健康状况
请求健康检查:当前连接与连接限制、具有高死元组计数的表、长时间运行的事务和自动清理状态。 Neotask 查询 pg_stat_* 视图并将数字转换为可操作的结果。
管理架构和对象
创建表、添加列、修改约束、创建索引和管理角色——所有这些都通过自然语言进行。 Neotask 生成正确的 DDL 并在运行模式修改操作之前确认它们。
排除锁定和阻塞故障
要求 Neotask 识别阻塞查询,显示哪些会话正在等待锁定,并安全地终止特定连接 - 在任何 pg_terminate_backend 调用之前进行确认。
尝试询问
“显示过去 7 天内按客户所在国家/地区分组的所有订单”
“为什么这个查询很慢?” (粘贴您的查询)
“哪些表的死元组最多并且需要 VACUUM?”
“在用户表上为电子邮件列创建索引”
“哪些查询当前运行时间超过 30 秒?”
“显示所有具有超级用户角色的用户”
“该服务器上每个数据库的大小是多少?”
“向会话表中的created_at 列添加NOT NULL 约束”专业提示
在针对生产环境运行之前,始终要求 Neotask 解释其 SQL — 确认连接和 WHERE 子句符合您的意图。
对探索性查询使用“只读”框架:“只向我显示数据,不要更改任何内容”,因此 Neotask 避免了探索性请求上的 DML。
要求对 1 秒内返回的查询进行 EXPLAIN ANALYZE——有时计划看起来不错,但存在估计错误,会造成大规模损害。
创建索引时,请询问部分索引或覆盖索引是否比全表索引更适合您的访问模式。
将 PostgreSQL 查询与下游工具结合起来:“查询数据库以查找本周注册的用户并将他们添加到我们的 Mailchimp 受众中。”
Works Well With
- airtable - Connect AirOps and Airtable with Neotask to automate AI content workflows, sync brand kits, and manage your content data...
- basecamp - Connect Azure DevOps to Twilio with Neotask. Get SMS alerts for pipeline failures, work item updates, and deployment eve...
- close - Connect ClickUp and Twilio to send SMS alerts for task updates, deadlines, and project milestones. Automate project SMS ...
- discord - Connect Dropbox and Hotjar with Neotask to organize UX research files, store session recordings, and centralize user res...
- firecrawl - Connect Firecrawl and PostgreSQL with Neotask to build automated web scraping database pipelines. Store scraped data in ...
- glean - Connect Glean and PostgreSQL with Neotask to unify enterprise search across your SQL databases. Discover knowledge, quer...
- google-ads - Connect Google Ads to PostgreSQL with Neotask. Sync campaign data, automate reporting, and build a reliable ad data ware...
- google-analytics - Sync and export Google Analytics data to PostgreSQL automatically. Build a powerful analytics data warehouse with Neotas...
- guru - Connect Guru and PostgreSQL with Neotask to sync knowledge base content, automate data queries, and keep your team's ver...
- linear - Connect Linear and PostgreSQL with Neotask. Sync issue data to your database, run engineering analytics, and automate re...
- mixpanel - Connect Mixpanel to PostgreSQL with Neotask. Export product analytics data into your SQL database, build custom reports,...
- netlify - Sync Basecamp project milestones with Google Calendar. Neotask automates schedule visibility across project management a...