快乐冲浪与生活

多体验、多体会、多体悟

0%

基础查询、关联查询、排序与分组、特殊场景、索引设计

基础查询优化

🎯 目标:规避全表扫描、减少网络 / 内存开销,让查询更轻量化

  1. 只查所需字段,拒绝 SELECT *

❌ SELECT * FROM users;

✅ SELECT id, name, phone FROM users;

Mosquitto 是 MQTT 的开源实现之一,GitHub 地址 https://github.com/eclipse-mosquitto/mosquitto ,介绍信息如下:

Mosquitto is an open source implementation of a server for version 5.0, 3.1.1, and 3.1 of the MQTT protocol. It also includes a C and C++ client library, the mosquitto_pub mosquitto_rr, and mosquitto_sub utilities for publishing and subscribing, and the mosquitto_ctrl, mosquitto_signal, and mosquitto_passwd applications for helping administer the broker.

MQTT 是什么

MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)是一种轻量级基于发布 / 订阅(Pub/Sub)模式的应用层网络协议,专为低带宽、高延迟、不稳定的网络环境(如物联网、嵌入式设备)设计

Zod 中定义的 Record 对应着 TS 中的 Record,用于构建键值对。

1
2
3
4
5
6
7
8
import * as z from 'zod'

const StudentSchema = z.record(z.string(), z.string())
type Student = z.infer<typeof StudentSchema>

// 等价于

type Student = Record<string, string>

JSON 和对象

TS 中 Record 与 JSON 和对象相似,对应的概念如下: