Why Your SQL Query Ignores Your Index (and How to Check)
The column is indexed. The query is slow anyway. Almost every time, the reason is one of six small things. Continue reading on Medium »
The column is indexed. The query is slow anyway. Almost every time, the reason is one of six small things. Continue reading on Medium »
São dez horas e vinte e um minutos, uma quarta-feira de lua minguante. Já é quase dezembro e, ao som de V, escrevo como se soubesse o rumo… Continue reading on Medium »
Maybe you’ve thought it too: I’d like to marry someone from another country, but I don’t know anyone there. Continue reading on Medium »
Breaking monolithic queries into indexed intermediate staging tables that execute faster and debug cleanly Continue reading on Medium »
Most of the work I take on is an app that is already 80% built. Someone got a working prototype out of Cursor, Bolt or Lovable, showed it to a few people, and then hit the part the tool cannot do: real accounts, real payments, a store review, a client who wants to log in. I finish those in three to five days. The finish is the part people ask about. The handover is the part nobody asks about, and it is the part that decides whether the app is still alive three months later. So here is what actually goes into a handover at CPC AI Studio (https://cpcai-studio.web.app/en/), and why each item exis
将高并发监控 API 从本地技术栈迁移至 Databricks 数据智能平台 高管视角 现有平台结合了 Spring Boot 3.2.6、Vue 3、PostgreSQL、InfluxDB、Redis、Kafka 和 Docker,用于交付安全监控 API、仪表板、时序分析、事件摄取、缓存以及运营工作流。随附的架构摘要描述了一项重大的性能成就:将核心监控 API 的延迟从两秒多降低至 50 毫秒以内,同时维持每秒 500 次以上查询 (QPS) 的并发量。报告指出,这种提升并非源于单纯将 Redis 作为表层的加速层,而是通过以下方式实现的:分离权威真实数据与交付机制、对读取路径进行分类、预计算昂贵的结果、管控缓存键、携带数据新鲜度元数据、协调缓存未命中、限制数据库工作量以及在故障期间进行安全降级。 这些原则是可靠的,但在本地部署(On-Premises)中,其经济和运营上限越来越难以突破。随着事件数据量、租户数量、分析历史记录、仪表板复杂性、数据保留期和并发量的不断增长,PostgreSQL 和 InfluxDB 必须同时兼顾权威的运营工作负载和日益昂贵的分析查询。Redis 能在一定程度上保护它们,直到缓存未命中、缓存集中过期、故障转移事件或新查询暴露底层计算成本。Kafka 可以吸收写入激增,但事件历史记录却变得碎片化,散布在消息代理、时序存储、关系型数据库和特定应用的读取
The most valuable software companies are not necessarily those with the best technology, the largest engineering teams, or the most… Continue reading on Skill Stuff »
将本地微服务数据体系迁移至 Databricks 数据智能平台 高管视角 (Executive Perspective) 现有平台集成了 Spring Boot 3.2.6、Vue 3、PostgreSQL、InfluxDB、Redis、Kafka、Docker,以及企业级微服务运营模式。所附的架构白皮书准确指出,微服务并不会消除复杂性。它们只是将复杂性重新分布到了网络、数据存储、交付团队、运行时环境和契约之间。该白皮书提出了具有严格数据所有权的业务模块、受管制的异步事件、可重用的 Spring Boot 能力库、OpenAPI 契约、Kafka 消息包装机制(envelopes)、OpenTelemetry、有界弹性控制以及渐进式的绞杀者模式(strangler)迁移。它将理想的领导模式描述为“受限自治(constrained autonomy)”,即领域团队控制业务能力,而平台团队提供安全的工程默认设置。 这是一个强大的应用架构基础,但它本身并不能解决企业级数据问题。当每个业务模块都拥有自己的数据库、事件主题、缓存、遥测和部署生命周期时,运营层面的所有权得到了提升,但分析数据的碎片化却加剧了。一个客户、资产、漏洞、警报、交易或策略可能会在多个 PostgreSQL 模式(schemas)、多个 Kafka 主题、InfluxDB 测量值、Redis 键以及特定于应用程序的报告中
将本地实时安全平台迁移至 Databricks 数据智能平台 执行层视角 (Executive Perspective) 当前的技术资产结合了 Spring Boot 3.2.6、Vue 3、PostgreSQL、InfluxDB、Redis、Kafka 和 Docker,以提供事件摄取、时间序列分析、交互式应用服务、缓存以及自动化的运维响应。随附的执行摘要描述了一个要求严苛的安全用例,在该用例中,每天必须将超过 100,000 个警报转化为及时的、受控的、可解释的行动。它将事件传输、时间上下文、策略评估和设备执行分离开来,同时坚持将“检测”与“响应授权”区分开,并要求每一个自动化操作都必须是可逆的、限流的、幂等的和可审计的。 该架构包含合理的原则,但其本地部署的实现方式造成了结构性上限。企业必须独立扩展和运维 Kafka 代理、InfluxDB 存储、PostgreSQL 事务数据库、Redis 集群、Docker 主机、集成服务、规则、保留策略流程、监控系统以及灾难恢复设施。业务真相分散在事件主题、时间序列指标、关系型数据表、缓存值、规则引擎状态、设备命令和应用日志中。随着警报数量、保留期限、租户数量、分析复杂度和治理义务的增加,该平台将把更多的工程精力耗费在维护基础设施的稳定性上,而在改善安全结果上投入的精力则越来越少。 不应将 Databricks 迁移视为对每个运维组件的
Editing your book is one thing. Fixing your grammar, sentence structure, pacing, clarity, and all of that. But who is the one that fixes… Continue reading on Medium »
Continue reading on Medium »
从碎片化的本地数据交付到 Databricks 数据智能平台 高管视角 当前平台结合了 Spring Boot 3.2.6、Vue 3、InfluxDB、PostgreSQL、Redis、Kafka 和 Docker。这是一个可靠的现代化应用程序技术栈,但这并不意味着它自动成为了一个现代化的企业数据平台。它的各个独立组件解决了一些重要问题:Spring Boot 提供事务服务和 API,Vue 提供用户体验,PostgreSQL 保存关系型状态,InfluxDB 存储时间序列测量值,Redis 加速重复读取,Kafka 传输事件,而 Docker 将打包标准化。然而,当组织必须在数据量不断加速增长、数据治理日益严格、分析需求愈发苛刻以及并发不可预测的情况下,将这些组件作为一个可靠的系统来运营时,业务上的困难便显现出来了。 随附的架构摘要准确地指出了核心问题:需要以行动的速度提供可靠的真相(dependable truth at the speed of action)。摘要中指出了“直接查询陷阱”(即交互式联接和聚合会使数据库过载)以及“过度缓存陷阱”(即长期存在的缓存结果会产生误导)。为此,摘要提出了计划性计算、受治理的 Redis 服务层以及带有缓存回填(cache backfilling)的受控实时聚合,同时将数据新鲜度、系统弹性、租户隔离和面向用户的可观测性作为明确的设计考
This is Part 6 of the zero-dependency engineering series behind SOL-2027 (Part 1 · Part 2 · Part 3 · Part 4 · Part 5). Building an interactive 13-month calendar explorer in the browser solves discovery, yet daily planning still lives inside Google Calendar, Apple Calendar, and Outlook. Readers who discovered their fixed-calendar birthday or looked up the 13 lunar cycles wanted one click to drop every 2027 International Fixed Calendar boundary — especially Month 07: SOL (Jun 18 – Jul 15), December 29 (Year Day), and all 13 UTC New Moons — straight onto their existing schedule. Rather than pulli
Disclosure: I work on VibUI, a paid catalogue of website prompts. The library appears once, near the end. Every step, template, and review check below works if you write the brief yourself. Short answer: a developer tool or open-source project page works when a visitor can tell in thirty seconds what the tool does, how to install or run it, which languages or runtimes it supports, where the source and license live, and what the current limitations are—without invented speed benchmarks, fake "used in production by" logos, or broken code snippets. You can brief an AI builder to draft that page i
Your workflow has a cache step, but the log keeps saying Cache not found for input keys, or the cache restores and the install step still takes as long as before. Either way the cache isn't doing its job. This post covers how actions/cache decides what to restore, the causes of a miss and how to spot each one, and a short script that counts your real hit rate from the run logs. What the log is telling you The cache step prints one of three lines. These come straight from the actions/cache source (v6.1.0): Cache restored from key: Linux-npm-3f1c... Cache not found for input keys: Linux-npm-3f1c
Why technically impressive products fail while seemingly ordinary software becomes indispensable. Continue reading on Skill Stuff »
OpenAI's DevDay keynote lasted about an hour. The recap counts "more than 20 major announcements across ChatGPT, Codex, our models, and entirely new forms of working with AI." That is a lot to hold in your head at once, so let me do the sorting for you: most of it is genuinely useful, one of it quietly changes who pays for your users' tokens, and the boldest claim comes with no evidence at all. DevDay 2026 ran on Tuesday, November 24, 2026, in San Francisco. Here is what actually shipped, what it costs, and what I'd do about it this week. Dots: agents that don't go home when you close the tab
执行摘要:在缓存故障期间工程化设计安全的数据库回退机制 概述 缓存中断不仅仅是一个延迟问题;它是一个大规模的负载转移事件。如果系统在缓存(如 Redis)出现故障时,默认将所有流量路由到数据库,数据库将瞬间被压垮,从而将局部中断演变成全面的系统性故障。本文档概述了通过有界并发、优雅降级和受控恢复来安全管理数据库回退所需的工程原则。 核心问题:负载转移的错觉 容量不对称: Redis 旨在吸收海量、重复的读取需求。而主数据库的容量规划是为了写入、数据摄取和复杂查询,而非缓存级别的吞吐量。 “重试风暴”: 当 Redis 发生故障或变慢时,简单的回退机制会将 100% 的读取负载倾泻到数据库上,再加上用户和自动化客户端由于请求延迟而疯狂重试,使情况雪上加霜。 目标: 必须将回退视为一种稀缺的应急资源。目标是在保护数据库的同时维持关键业务功能(如主动威胁遏制),而不是人为地去追求 100% 的功能可用性。 安全数据库回退的关键原则 1. 端点分类与优雅降级 并非所有功能都有资格获得紧急的数据库访问权限。 关键端点(例如,活动事件状态)分配预留的回退容量。 重要端点提供有期限的过期数据(旧数据)。 可延期端点(例如,历史数据导出)应快速失败(返回 HTTP 503)以节省系统资源。 2. 过期重验证 / Stale-While-Revalidate(最安全的回退方式) 最有效的回退查询是压
执行摘要:构建高并发监控 API 概述 在企业安全运营中,仪表板延迟是一个关键的风险因素,它会减缓威胁遏制的速度。本文档概述了用于将核心监控 API 响应时间从两秒以上缩短至 50 毫秒以下的工程策略,同时保持 500+ 的每秒查询率 (QPS)。其核心成就不仅在于添加了缓存,更在于通过将权威数据源与交付机制分离,从根本上改变了数据读取的经济模式。 并发挑战 故障的正反馈循环: 安全监控流量具有高度突发性(例如,在重大事件期间)。如果每个仪表板组件都需要进行高成本的数据库聚合查询,并发将成倍增加系统负载。随着数据库变慢,客户端会发起重试,队列随之增长,系统性能不断下降,直到所有请求都失败。 平均值的缺陷: 平均延迟会掩盖关键性故障。一个系统可能表现出很快的平均响应时间,但在分析师最需要该平台的时候,其 99 分位 (p99) 的响应时间却可能长达数秒。 目标: 在实际的并发负载下,实现可预测的尾部延迟、可控的源系统压力以及透明的数据新鲜度。 优化策略 1. 读取路径分类 并非所有请求都是相同的。架构根据业务价值和成本采用不同的执行模型: 预计算缓存 (Redis): 适用于高价值、读取频繁且计算成本高的聚合数据(例如:关键警报总数),这些数据能够容忍一定程度的延迟(有界的陈旧性)。 直接数据库查询: 适用于低成本查找或高度特定的、重用率低的临时 (ad-hoc) 调查。 异步任务:
Sugriva knew his brother Vali's strength better than anyone. Even with Rama's promise of help, he wasn't convinced that Vali could be… Continue reading on Medium »
The tunnel comes up. The interface gets an address, ping 8.8.8.8 replies in 30 ms, DNS resolves. Then the browser spins forever on the first real page, and half the images arrive as broken icons. Nothing is down. The link works perfectly in exactly the packet-size range that never tests the problem. Why "it connects" proves nothing about payload A TCP handshake is a bare SYN with no payload — around 60 bytes. A DNS query is usually under 100. A TLS ClientHello is a few hundred. Every one of those fits inside any plausible MTU, so a successful connection only proves that small packets survive t
Understand processes, threads, and CPU cores, how they work together, and how to improve application performance in 2026. Continue reading on Medium »
The return of Kurtley Beale to the Wallabies team for cap number 96 after a five-year absence is a reward for his continuing excellence, coach Les Kiss insists.
• Amnesty says Israeli actions are preventing births in Gaza, seeks probe into ‘commission of genocide’ • UN alerts world to danger of Israeli atrocities CAIRO: Israel’s military killed a Hamas security official as well as his wife and two daughters with an air strike on their Gaza Strip apartment on Wednesday. The strike that killed Mohammad Abuelouf, a Hamas colonel who headed the internal security service in northern Gaza, and his family was the second Israeli attack to kill a senior Hamas security official since Tuesday. The Israeli military confirmed it had killed Abuelouf, whom it descri
Understanding the financial choices that shape business growth, ownership, profitability, and long-term sustainability. Continue reading on Medium »
November 26 — Constitution Day of India Continue reading on Medium »
YOUR ONLY COMPETITION IS YOU Continue reading on Medium »
Consider: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> // Linked List node struct node { // 'key' is a string char* key; // 'value' is also a string char* value; struct node* next; }; // like constructor void setNode(struct node* node, char* key, char* value) { node->key = key; node->value = value; node->next = NULL; return; }; struct hashMap { // Current number of elements in hashMap // and capacity of hashMap int numOfElements, capacity; // It holds the base address array of the linked list struct node** arr; }; // like constructor void initializeHashMap(stru
Join the discussion →#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> // Linked List node struct node { // key is string char* key; // value is also string char* value; struct node* next; }; // like constructor void setNode(struct node* node, char* key, char* value) { node->key = key; node->value = value; node->next = NULL; return; }; struct hashMap { // Current number of elements in hashMap // and capacity of hashMap int numOfElements, capacity; // hold base address array of linked list struct node** arr; }; // like constructor void initializeHashMap(struct hashMap* mp) { // Default c
Join the discussion →