75 subscribers
Go offline with the Player FM app!
Podcasts Worth a Listen
SPONSORED


20,000 Times Faster Order By Limit | Scaling Postgres 366
Manage episode 483566153 series 2140130
In this episode of Scaling Postgres, we discuss a top ten dangerous Postgres issues list, importing and exporting statistics, more Postgres 18 beta features and a 20,000 times faster query by fixing an order by limit issue.
To get the show notes as well as get notified of new episodes, visit:
https://www.scalingpostgres.com/episodes/366-20k-faster-order-by-limit/
Want to learn more about Postgres performance? Join my FREE training called Postgres Performance Demystified here: https://www.scalingpostgres.com/courses/postgres-performance-demystified/
537 episodes
Manage episode 483566153 series 2140130
In this episode of Scaling Postgres, we discuss a top ten dangerous Postgres issues list, importing and exporting statistics, more Postgres 18 beta features and a 20,000 times faster query by fixing an order by limit issue.
To get the show notes as well as get notified of new episodes, visit:
https://www.scalingpostgres.com/episodes/366-20k-faster-order-by-limit/
Want to learn more about Postgres performance? Join my FREE training called Postgres Performance Demystified here: https://www.scalingpostgres.com/courses/postgres-performance-demystified/
537 episodes
All episodes
×
1 4 Times Faster UUID Primary Keys | Scaling Postgres 368 19:10

1 How Often Does That Query Run? | Scaling Postgres 367 13:10

1 20,000 Times Faster Order By Limit | Scaling Postgres 366 14:46

1 Here Comes Async I/O! | Scaling Postgres 365 20:01

1 Scaling For High Volume | Scaling Postgres 364 20:39

1 Top Ten Postgres Dos & Don'ts | Scaling Postgres 363 13:32

1 Optimizing For Time-Series Data | Scaling Postgres 362 12:22

1 A Roadmap To Scaling Postgres | Scaling Postgres 361 17:28

1 Handle One Million Connections? | Scaling Postgres 360 16:17

1 Trillions of Rows & Metrics | Scaling Postgres 359 18:27

1 Postgres Conference 2025 | Scaling Postgres 358 23:37

1 Postgres Best Practices? | Scaling Postgres 357 9:58

1 Is the Future Immutable? | Scaling Postgres 356 15:21

1 Top Ten Analytics with pg_mooncake | Scaling Postgres 355 15:59

1 Postgres & The US Treasury Attack | Scaling Postgres 354 15:43

1 OLTP To Parquet For Analytics | Scaling Postgres 353 15:59

1 You Can Always Optimize More | Scaling Postgres 352 14:32


1 Seven Years of Scaling Postgres | Scaling Postgres 350 19:09

1 The Dangers of Temporary Tables | Scaling Postgres 349 15:24

1 The Future Is Containers? | Scaling Postgres 348 12:28

1 Easy Incremental Data Processing? | Scaling Postgres 347 14:47

1 Things I Don't Do In Postgres | Scaling Postgres 346 15:47

1 Over 5X Faster Postgres? | Scaling Postgres 345 17:02

1 Performance & Hard Things | Scaling Postgres 344 17:38

1 Postgres Release Warning! | Scaling Postgres 343 18:50

1 Faster Writes With ZFS? | Scaling Postgres 342 13:19

1 The Future of Postgres Upgrades | Scaling Postgres 341 14:15

1 Do You Need A Vectorizer? | Scaling Postgres 340 16:39

1 Postgres Goes Parquet | Scaling Postgres 339 11:32

1 JSON Goodies In Postgres 17 | Scaling Postgres 338 17:03

1 77 Times Faster In Postgres 17 | Scaling Postgres 337 14:19

1 More Postgres 17 Highlights | Scaling Postgres 336 12:54

1 Postgres 17 Released! | Scaling Postgres 335 18:32

1 Optimizing For Analytics | Scaling Postgres 334 21:55


1 Sometimes It Is Slow? | Scaling Postgres 332 15:10

1 Is pg_dump A Backup Tool? | Scaling Postgres 331 17:31

1 Splicing Elephant & Duck DNA | Scaling Postgres 330 14:58

1 PGlite: Embeddable Postgres & postgres.new | Scaling Postgres 329 19:01

1 Implement Get Or Create | Scaling Postgres 328 16:10

1 Postgres Graph Queries | Scaling Postgres 327 16:30

1 Faster Index Creation | Scaling Postgres 326 20:28



1 PgBouncer Breaking Change | Scaling Postgres 323 23:47

1 Postgres Sort Instability? | Scaling Postgres 322 19:48



1 When Postgres Development Stopped! | Scaling Postgres 319 12:05

1 Postgres 17 Beta 1 Released | Scaling Postgres 318 17:54

1 Time-Series Open Source Extension | Scaling Postgres 317 14:56

1 New Releases & 1,000 Times Faster Query | Scaling Postgres 316 14:34

1 Hacking On Postgres is Hard! | Scaling Postgres 315 19:31

1 150 Times Faster pgvector? | Scaling Postgres 314 16:30

1 The Future of MySQL is Postgres? | Scaling Postgres 313 15:33

1 Postgres 17 Commit-orama | Scaling Postgres 312 12:57

1 1,400 Times Faster Max & Group By Performance | Scaling Postgres 311 18:52

1 Andres, Microsoft & Postgres Save Linux? | Scaling Postgres 310 12:55

1 Will Postgres Pull A Redis? | Scaling Postgres 309 15:12

1 Scale Through Sharding | Scaling Postgres 308 18:15


1 Scalability Limits From SLRU & Lock Manager | Scaling Postgres 306 14:29

1 11K Faster Configuration Change | Scaling Postgres 305 13:26

1 Overhead of pg_stat_statements | Scaling Postgres 304 14:09

1 PgBouncer, PgCat, Supavisor Fight!!! | Scaling Postgres 303 19:55

1 UUID vs Bigint Battle!!! | Scaling Postgres 302 13:23

1 Postgres LLM OS & 30 Times Faster Index Builds | Scaling Postgres 301 18:14

1 Scaling Postgres Celebration | Scaling Postgres 300 18:02


1 10-100 Times Higher Latency With Distributed Postgres | Scaling Postgres 298 19:28


1 State Of Postgres 2023 | Scaling Postgres 296 17:45

1 30K Messages Per Second Queue | Scaling Postgres 295 15:32

1 How Much Observability Is Needed? | Scaling Postgres 294 14:09

1 Better Plans With Statistics | Scaling Postgres 293 15:18

1 Companion Databases? | Scaling Postgres 292 13:13

1 2 To 4 Times Faster With Vectorization | Scaling Postgres 291 18:15

1 Postgres Releases = Reindexing | Scaling Postgres 290 14:22

1 Postgres Scheduling Opportunities | Scaling Postgres 289 15:19

1 Index Corruption From ICU Collation Change | Scaling Postgres 288 19:02

1 15% - 250% Faster Query Throughput | Scaling Postgres 287 14:25

1 20 Times Faster Text Search & Ranking? | Scaling Postgres 286 12:59


1 23 Or 1.1 Times Faster Performance? | Scaling Postgres 284 18:59

1 222 Times Faster Analytical Queries With Columnar Storage | Scaling Postgres 283 16:00

1 Postgres 16 Released, The Postgres Meme, File vs base64 Strings, Intelligent Sharding | Scaling Postgres 282 14:00

1 HNSW Indexes, Vacuuming Bloat, Watch Me Now, Connections | Scaling Postgres 281 17:12

1 Postgres 16 RC1, Bi-Directional Replication, All About Parameters, Foreign Keys & Polymorphism | Scaling Postgres 280 21:09

1 TPS Benchmark, Partition-wise Join & Aggregate, Partitioning Billions, Posgres 16 Features | Scaling Postgres 279 15:59

1 Squeeze Your System, One Million Connections, Indexing LIKE, pgvector HNSW | Scaling Postgres 278 15:58

1 Postgres Releases, PostgreSQL Survey, Partitioning vs. Sharding, Bulk Loading | Scaling Postgres 277 19:04

1 BRIN & Correlation, Poor Partitioning, 10 Beginner Tips, Table & Index Usage | Scaling Postgres 276 15:57

1 No More Vacuum, Zero-Downtime Cut-Over, Network Impact, Not In Optimization | Scaling Postgres 275 13:17

1 Subquery Performance, Avoid Update Locking, Column Changes, Outage Workshop | Scaling Postgres 274 14:40

1 Debian / Ubuntu Packaging, ivfflat Indexes, In vs Any, View Logging | Scaling Postgres 273 15:35

1 Postgres 16 Beta 2, The Rise of Vectors, FDW Performance, Unused Indexes | Scaling Postgres 272 14:39

1 30% Faster, UUID Downsides, Growing WAL, Processes vs. Threads | Scaling Postgres 271 16:24

1 Data Skew, Monitoring, Remote Access CSV, Documentation | Scaling Postgres 270 14:16

1 Upgrade Struggles, Hyperloglog, PgBouncer Usage, Postgres Scaling | Scaling Postgres 269 18:41

1 Faster Copy, psql Variables, backup_label, Bad Encoding | Scaling Postgres 268 11:38

1 PostgreSQL 16 Beta 1, Rust Functions, Partitioning Memory Problems, Tags & Arrays | Scaling Postgres 267 16:03

1 Postgres Releases, Postgres Distributed, Privilege Template, Real-Time Dashboards | Scaling Postgres 266 16:53

1 pg_stat_statements, Transaction ID Wraparound, Consultant Knowledge, CitusCon | Scaling Postgres 265 16:47

1 The Worst Part, Pluggable Storage, A Busy System, Data Architecture | Scaling Postgres 264 17:01

1 LZ4 & ZSTD Compression, Avoiding Problems, Triggers Simplify, Indexes Can Hurt | Scaling Postgres 263 19:14

1 pg_failover_slots, Standby Logical Decoding, Trusted Language Extensions, Postgres Package Manager | Scaling Postgres 262 14:43

1 Easy Foreign Data Wrappers, JSONB Cheatsheet, Updating Cost Limit, Parallel Aggregate | Scaling Postgres 261 16:24

1 PL/Rust, Row Locks, Postgres Errors, SQL 2023 | Scaling Postgres 260 12:09

1 Recovery Time, Lost Data, Production Ready, PG16 Highlights | Scaling Postgres 259 13:34

1 Logical Replication, Database Antipatterns, max_wal_size Setting, Delete vs. Truncate | Scaling Postgres 258 8:41

1 Adopting PgCat, Time Bins, work_mem Settings, Bad Constraints | Scaling Postgres 257 19:16

1 11TB WAL, pgec Writes, Patroni 3 & Citus, PostgREST | Scaling Postgres 256 12:23

1 Integer Overflow, User-Friendly Permissions, Dump & Logical Replication, Worker Config | Scaling Postgres 255 17:43

1 PG Edge Cache, Postgres & OpenAI, citext to Collations, Compression Options | Scaling Postgres 254 13:14

1 Unlogged Tables, pg_stat_io, Type Constraints, Text Types | Scaling Postgres 253 16:25

1 Postgres Releases, Performance Secrets, Don't Do This, Filter vs. Case | Scaling Postgres 252 14:56

1 Filter Clause, Hypothetical Index, Non-Relational Data, Using TOAST | Scaling Postgres 251 16:56

1 Performance Issue, Survive Without Superuser, Reserved Connections, Partition Management | Scaling Postgres 250 14:03

1 Locking Tables, Foreign Key Issue, Slow Decimals, Memoize & Joins | Scaling Postgres 249 9:06

1 Pagination Solutions, Return Modifications, Insert Deletions, How To JSON | Scaling Postgres 248 17:20

1 Generate Test Data, Faster Archiving, Date Statistics, Useless Indexes | Scaling Postgres 247 14:25

1 Columnar Tables, Advent of Code, PG 16 Features, Commit Times | Scaling Postgres 246 10:18

1 ENUMs vs Check Constraints, Faceting With Roaring Bitmaps, Better Scaling, In DB Business Logic | Scaling Postgres 245 11:40

1 Index Merge vs Composite, Transparent Column Encryption, Trusted Language Extensions | Scaling Postgres 244 14:59

1 IN vs ANY, Ghost Conditions, Percentage Calculations, Variadic Unnest | Scaling Postgres 243 10:25

1 Reduce Replication Lag, Explain Parameterized Query, PostGIS Day, Multiple PgBouncers | Scaling Postgres 242 11:38

1 Postgres 15.1, Postres 10 Retrospective, Reducing Replication Lag, Listen & Notify | Scaling Postgres 241 17:53

1 Forced Sequential Scans, Table Renaming, Terminology, PGSQL Phriday | Scaling Postgres 240 19:17

1 Shared Buffers, Compression Algorithm, Merge Command, Postgres Contributions | Scaling Postgres 239 15:18

1 Slow Updates, Lateral Joins, Serial To Identity, PG 15 Changes | Scaling Postgres 238 13:05

1 Postgres 15 Released, File Systems, Connection Pooling, Secure Connections | Scaling Postgres 237 18:53

1 Postgres 15 RC2, Shared Buffers, Secure Connections, PGSQL Phriday | Scaling Postgres 236 19:54

1 Postgres 15 RC1, ICU Collations, Listen & Notify, Understanding TOAST | Scaling Postgres 235 16:21

1 Rust for Extensions, Timescale vs. Postgres, Uninterrupted Sharding, Data Flow | Scaling Postgres 234 16:20

1 Useful Features, Community Blogging, PG 15 Anticipation, Generic Plans | Scaling Postgres 233 13:43

1 PG15 Beta 4, Primary Key Options, Sequence Limits, Configuration | Scaling Postgres 232 14:36

1 PG15 Public Schema, Kubernetes Experiences, Dump Manifests, PgBouncer Fork | Scaling Postgres 231 19:03

1 Stats Collector Gone, Handling Latency, PG In The Browser, Future High Availability | Scaling Postgres 230 12:33

1 Postgres Playground, PG14 Internals, DB Corruption, Anti-Join | Scaling Postgres 229 11:49

1 New Postgres Releases, Privilege Escalation CVE, Chaos Testing, High Availability | Scaling Postgres 228 12:45

1 Researching Performance, Postgres Survey, pgAdmin Survey, Long Running Queries | Scaling Postgres 227 8:53

1 SQL Functions, Explain Analyze Buffers, Debug Autovacuum, RLS Multi-Tenancy | Scaling Postgres 226 16:19

1 PSQL GEXEC, Delete Duplicates, Postgres Podcast, Puny to Powerful | Scaling Postgres 225 10:21

1 Column Performance, BRIN Win, Unique and Null, Parallel Distinct | Scaling Postgres 224 13:57

1 Database Decomposition, Fast Text Search, Understanding pg_stat_activity, Window Functions | Scaling Postgres 223 14:59

1 Postgres 15 Beta 2, Concerning Locks, Vacuum Tuning, Transaction Anomalies | Scaling Postgres 222 17:47

1 psql Shortcuts, Debugging Deadlocks, Find & Stop Queries, Using SCRAM | Scaling Postgres 221 17:35

1 PG 14.4 Release, Subscription Skip, Using Schemas, Open Source Citus | Scaling Postgres 220 18:57

1 Out-Of-Cycle Release, Should You Upgrade, Postgres Survey, Automatic Indexing | Scaling Postgres 219 12:34

1 PG14 Index Bug, View Permissions, Logical Replication Conflicts, AlloyDB Under the Hood | Scaling Postgres 218 17:03

1 Schema Change Mistakes, Canceling Statements, pg_rman, Pedantry Removal | Scaling Postgres 217 16:33

1 PG 15 Beta 1 Release, Query Breakdown, Sort Performance, Prepared vs. Partitioned | Scaling Postgres 216 13:50

1 New Releases, AlloyDB, Time Zones, Connecting to Postgres | Scaling Postgres 215 17:13

1 Backup Compression, Postgres IO, Parquet Files, pg_stat_monitor | Scaling Postgres 214 19:29

1 Planner Optimization, Fish to Elephants, Large Databases, Spatial Data | Scaling Postgres 213 15:54

1 Slow Queries, 4TB Upgrade, Postgres on ZFS, Storage Stampede | Scaling Postgres 212 21:23

1 Multiranges, Missing Metrics, Newbie PostGIS, Conference Videos | Scaling Postgres 211 11:17

1 Date Time Bins, Search Every Field, JSON_TABLE, Picking Primary | Scaling Postgres 210 9:52

1 Tidy Vacuum, Dropping Roles, Merge Command, PgBouncer Tutorial | Scaling Postgres 209 14:14

1 pgbouncer Released, Query Parameter Types, Lateral Joins, Security Invoker Views | Scaling Postgres 208 12:14

1 Autovacuum Configuration, Duplicate Key Violations, Pipelining, Tuning max_wal_size | Scaling Postgres 207 17:54

1 100x Optimizations, Auditing, Document Schema Designs, Checksums | Scaling Postgres 206 17:51

1 Indexing With tsearch, Tuples Not Yet Removable, Wicked Problems, Pattern Matching | Scaling Postgres 205 9:56

1 Optimizing Trigram Search, Replication Review, Logical Improvements, Timescale Investment | Scaling Postgres 204 18:42

1 Saving Space, Working with TOAST, Protecting Data, High CPU Utilization | Scaling Postgres 203 12:11

1 New Postgres Releases, A Hairy Incident, Slow Down To Go Faster, Loadable Module Archiving | Scaling Postgres 202 12:49

1 JSONB Performance, Bidirectional Replication, Most Recent Record, PG14 JSON | Scaling Postgres 201 15:16

1 5 Minutes of Postgres, Unnest, SCRAM, Multi-master Review | Scaling Postgres 200 12:11

1 Shaped Sample Data, Version Changes, Missed Bottlenecks, Indexes for Newbies | Scaling Postgres 199 12:17

1 Monitoring Progress, More SQL, Replication Slot Failover, Postgres Contributors | Scaling Postgres 198 14:46

1 Explain Analyze Buffers, Healthier Postgres, 2021 Review, High Availability Aspirations | Scaling Postgres 197 14:35

1 Easy Recursive CTE, Zheap Undo, High Availability, Loading Data | Scaling Postgres 196 17:12

1 Aurora vs. Postgres, Surprising Transactions, Write-Only & Read-Only, Indexing Advice | Scaling Postgres 195 18:31

1 Go Faster, GIN Indexes, Collation Stability, PG14 & Beyond | Scaling Postgres 194 16:00

1 Entity-Attribute-Value Design, JSON Subscripting, mysql-fdw Push-down, New Regex | Scaling Postgres 193 9:26

1 Foreign Key Indexes, Graph Queries, Linux Huge Pages, Text Column Size | Scaling Postgres 192 12:39

1 Man-In-The-Middle, pg_auto_failover, Lesser Known Features, LZ4 Compression | Scaling Postgres 191 14:54

1 Hello Babelfish, Planner Deconstruction, Exist & Not Exist, Fun With SQL | Scaling Postgres 190 12:32

1 Index Downsides, TCP Keep Alive, Development with Postgres, Learning PL/pgSQL | Scaling Postgres 189 15:26

1 Automatic Indexing, Function Pipelines, With Hold Cursors, Query Scans | Scaling Postgres 188 15:26

1 Sharding, Federation, Linux HugePages, Performance Tuning | Scaling Postgres 187 15:05

1 Select For Update, PGx Framework, Cool Additions, Full-Text Search | Scaling Postgres 186 8:40

1 Postgres 14 Released, Using JSON, Not Using Indexes, Sequence Gaps | Scaling Postgres 185 21:19

1 Postgres 14 RC1, Little Things, Index Advisor, Million Inserts | Scaling Postgres 184 12:37

1 Broken Indexes, Trademark Issues, Percentile vs. Average, Logical Improvements | Scaling Postgres 183 14:50

1 Boundless Text, Revoked Permissions, Index Bloat, Hardware Performance | Scaling Postgres 182 13:50

1 Connection Scaling, Cached Sequences, Message Queuing, Harmful Subtransactions | Scaling Postgres 181 21:58

1 Aggregate Filters, Insert-Only & Vacuum, Out-of-sync Sequences, Functional Indexes | Scaling Postgres 180 16:29

1 Foreign Data Wrapper, Timescale Compression, Fuzzy Search, Query Execution | Scaling Postgres 179 15:40

1 Postgres Releases, Performance Discussion, Index Types, Index Power Use | Scaling Postgres 178 15:11

1 Planner Workarounds, Grouping Sets, Lateral Join, Not-So-Easy | Scaling Postgres 177 16:28

1 JSONB vs. Window Functions, Security Checklist, Full-Text Search, NFL Time-Series | Scaling Postgres 176 18:51

1 Zheap Status, Sequence Gaps, Efficient Pagination, Set Up Patroni | Scaling Postgres 175 13:33

1 Lateral Joins, Generating JSON, dbcritic, Fetch First Rows | Scaling Postgres 174 15:54
Welcome to Player FM!
Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.