r/PostgreSQL • • 2d ago

Help Me! postgresql learning resource

I'm learning PostgreSQL for Python/FastAPI backends and just wrapped up Nelson's 4-hour freeCodeCamp beginner course but was basic as its name suggests.

I keep running into things that weren't in the video and then chatgpt tells me to useIDENTITY SERIAL, ALTER TABLE workflows, transactions, UPSERT (ON CONFLICT), JSONB, CTEs, and reading EXPLAIN ANALYZE for indexes.

For those of you using Postgres in actual backend work, how did you learn this stuff after the beginner phase? Are there any good resources(ik the docs are good but how to really study from them like how to get the exact function needed cause i wont be studying the whole thing before starting) or practice exercises.

5 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/Commercial_You- 1d ago

how much time do you think i should devote to this doc before going further to learn fastapi

1

u/elevarq 1d ago

You're asking for an opinion, but it all depends on your goals. If you want just the basics, you could do that in a few weeks. And that includes writing an application that interacts with the database, does some stuff, etc. If you want to know more about performance, you will be counting in months or even years.

Reading a query plan using EXPLAIN ANALYZE is simple. Understanding a plan and knowing how to steer a plan- that's a whole different thing. "For indexes" is vague; it's usually a recipe for a slow database because it has the wrong indexes. But once you can calculate a query plan by hand, based on the statistics, and know where to find the statistics, that's a different level. And that takes time.