Skip to content

Instantly share code, notes, and snippets.

@kamidev
kamidev / zig_install_m3_max_macos.md
Last active July 31, 2025 12:49
zig_macos_m3_max_install

Personal notes building zig 0.15.0-dev.xxxx on Macbook M3 Max

20250731 Sequoia 15.6, latest XCode Commandline Tools, homebrew-installed LLVM 20.1.8 (llvm@20)

This way of building probably works on all Apple Silicon Macs, but you must check other models yourself. I keep a list of some successful M3 Max builds here

Some Intel Macs should also work (default homebrew path is the only significant difference). But I don't test that anymore.

@dmitry-naumenko
dmitry-naumenko / get_unused_indexes_en.sql
Created January 10, 2020 10:01
Identify unused indexes.
SELECT
idstat.relname AS TABLE_NAME,
indexrelname AS index_name,
idstat.idx_scan AS index_scans_count,
pg_size_pretty(pg_relation_size(indexrelid)) AS index_size,
tabstat.idx_scan AS table_reads_index_count,
tabstat.seq_scan AS table_reads_seq_count,
tabstat.seq_scan + tabstat.idx_scan AS table_reads_count,
n_tup_upd + n_tup_ins + n_tup_del AS table_writes_count,
pg_size_pretty(pg_relation_size(idstat.relid)) AS table_size