aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • Data
  • Programming

PyCon 2019 | From days to minutes, from minutes to milliseconds with SQLAlchemy

  • root
  • May 29, 2019
  • 1 minute read

PyCon 2019 | From days to minutes, from minutes to milliseconds with SQLAlchemy

Speaker:Leonardo Rochael Almeida

Object Relational Mappers (ORMs) are awesome enhancers of developer productivity. The freedom of having the library write that SQL and give you back a useful, rich model instance (or a bunch of them) instead of just a tuple or a list of records is simply amazing.

But if you forget you have an actual database behind all that convenience, then it’ll bite you back, usually when you’ve been in production for a while, after you’ve accumulated enough data that your once speedy application starts slowing down do a crawl.

Databases work best when you ask them once for (or to do) a bunch of stuff, instead of asking them lots of times for small stuff. We’ll discuss how innocent looking attribute accesses on your model instances translate to sequential queries (the infamous [N+1 problem][1]).

Then we’ll go through some practical solutions, taken from real cases that resulted in massive speed ups. We’ll cover how changes in Python code resulted in changes to the resulting SQL Queries

Solutions not only for queries, but also inserts and updates, which tend to be less well documented.

Though this talk focuses on SQLAlchemy, the lessons should be applicable to most ORMs in most programing languages. The ideas discussed, and solutions proposed are also valid for any storage backend, not only SQL databases.

[1]: https://docs.sqlalchemy.org/en/13/glossary.html#term-n-plus-one-problem

Slides can be found at: https://speakerdeck.com/pycon2019 and https://github.com/PyCon/2019-slides

Read More  A New Protocol Buffers Generator For Go
root

Related Topics
  • Database
  • PyCon
  • Python
  • SQL
  • SQLAlchemy
You May Also Like
View Post
  • Computing
  • Data

Sovereign Clouds Are Becoming A Big Deal Again

  • March 23, 2023
View Post
  • Big Data
  • Data

The Benefits And Core Processes Of Data Wrangling

  • March 17, 2023
mobile-laptop-developer-christina-wocintechchat-com-UTw3j_aoIKM-unsplash
View Post
  • Data
  • Software
  • Solutions

Build Customer Trust Through Secure Front End App Development & Cyber Security

  • March 14, 2023
View Post
  • Automation
  • Programming

Learn Expect By Writing And Automating A Simple Game

  • March 14, 2023
View Post
  • Data
  • Engineering

Sentiment Analysis With BigQuery ML

  • March 13, 2023
View Post
  • Data
  • Engineering

Rapidly Expand The Reach Of Spanner Databases With Read-Only Replicas And Zero-Downtime Moves

  • March 12, 2023
View Post
  • Data
  • Engineering

Shorten The Path To Insights With Aiven For Apache Kafka And Google BigQuery

  • March 9, 2023
View Post
  • Computing
  • Data

Snowflake’s Telecom Data Cloud Bets On Accelerating Cloud Efficiency

  • March 3, 2023

Stay Connected!
LATEST
  • 1
    My First Pull Request At Age 14
    • March 24, 2023
  • 2
    AWS Chatbot Now Integrated Into Microsoft Teams
    • March 24, 2023
  • 3
    Verify POST Endpoint Availability With Uptime Checks
    • March 24, 2023
  • 4
    Sovereign Clouds Are Becoming A Big Deal Again
    • March 23, 2023
  • 5
    Ditching Google: The 3 Search Engines That Use AI To Give Results That Are Meaningful
    • March 23, 2023
  • 6
    Pythonic Techniques For Handling Sequences
    • March 21, 2023
  • 7
    Oracle Cloud Infrastructure to Increase the Reliability, Efficiency, and Simplicity of Large-Scale Kubernetes Environments at Reduced Costs
    • March 20, 2023
  • 8
    Monitor Kubernetes Cloud Costs With Open Source Tools
    • March 20, 2023
  • 9
    What Is An Edge-Native Application?
    • March 20, 2023
  • 10
    Eclipse Java Downloads Skyrocket
    • March 19, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Cloudflare Takes On Online Fraud Detection Market
    • March 15, 2023
  • 2
    Linux Foundation Training & Certification & Cloud Native Computing Foundation Partner With Corise To Prepare 50,000 Professionals For The Certified Kubernetes Administrator Exam
    • March 16, 2023
  • 3
    Cloudflare Democratizes Post-Quantum Cryptography By Delivering It For Free, By Default
    • March 16, 2023
  • 4
    Daily QR “Scan Scams” Phishing Users On Their Mobile Devices
    • March 16, 2023
  • 5
    Lockheed Martin Launches Commercial Ground Control Software For Satellite Constellations
    • March 14, 2023
  • /
  • Platforms
  • Architecture
  • Engineering
  • Programming
  • Tools
  • About

Input your search keywords and press Enter.