Craig Kerstiens - Finger lime evangelist Profile
Craig Kerstiens - Finger lime evangelist

@craigkerstiens

8,668
Followers
893
Following
853
Media
27,017
Statuses

Product and eng @crunchydata . I blog at Curate . Previously @Microsoft , @citusdata , @Heroku , Truviso

Albany, CA
Joined January 2008
Don't wanna be here? Send us removal request.
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
Every time I've encountered a database without foreign key constraints and let the "app layer handle it" I've found data inconsistencies, every single time.
51
54
561
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Devs will do anything but learn SQL
39
37
439
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
Y'all this new JSON subscript syntax in Postgres 14 is sweet. Super excited to see Postgres just getting better bit by bit -
7
104
410
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
What you should do to preemptively help future performance on a new Postgres database? These tips will save the day for you when you need to investigate performance 🧵
5
49
273
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Talking with some folks about worry on scaling and how far Postgres can really go... benchmarked our $35 a month database plan pushing 5,000 transactions per second. That's 432,000,000 per day. When you see numbers X million or Y billion transactions, do the math. $35/mo 432m
12
29
230
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
This is so simple yet brilliant, if you want JSON/documents in a particular form here's a great post on how to let Postgres do the heavy lifting of returning it for you -
6
42
195
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 years
SQL has been one of the most valuable skills I’ve picked up in my career, here are a few thoughts on why the return on investment of learning it is well worthwhile:
12
61
171
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
If you think SQL can't be readable... you probably haven't used CTEs (common table expressions) or "WITH" clauses to write SQL with composable blocks. CTEs and proper indentation and you SQL can start to look more like code and way less scary.
13
22
168
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Way back at Heroku we had this idea of team swaps/internships. You could swap teams for a short period of time to get a sense of their world of engineering. For a lot of engineering teams with similar toolsets this worked out pretty well.
6
5
142
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Is Heroku in a good spot? No. If you can't appreciate what Heroku did for developer experience then you shouldn't be talking how you're creating a great developer experience. Respect your elders.
9
4
138
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
Excited to have joined @crunchydata to help build our their managed service offering, apparently the only thing I know how to do is run Postgres for people, at least it's Postgres though
11
6
132
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Postgres is so underrated as a metrics/analytics database.
17
4
125
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Legit curious on peoples views, was Heroku a huge success or failure?
85
5
125
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
I love the metrics of people "my app is scaling amazing because of shiny new serverless tech"... when the metrics are like 10k transactions in a day... And I'm just over here watching Postgres (a single server) push several 100k transactions per second.
5
12
122
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
It's easily 99% of all companies in the world 😏
13
5
118
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
Final day at Microsoft as part of the Azure Postgres team. I'd say lets catch up but well getting out not so much an option these days. Drop me a note would love to say hi virtually. Ready to unplug for a while for a good break and build quite a few lego sets.
8
1
116
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
ORMs aren't bad, but they do get over-used at times. Great for: Simple updates, CRUD operations, very simple aggregations, managing your migrations Mixed results on: Joins, subqueries Bad results: Generating reports Don't be afraid of jumping to SQL *when you need it*.
14
13
115
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
I work with Postgres daily and sometimes it still takes a bit for me to parse the output of an explain plan, this walkthrough is so handy if you're not a full time DBA in understanding a bit more about your Postgres query performance
2
17
111
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
Really excited to announce Crunchy Bridge - a modern Postgres as a service from @crunchydata There is a lot already in here and a lot more to come. Excited to make Postgres available and even more awesome for devs
13
32
114
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 years
Been a good journey and still plenty more to do, looking forward to this next chapter with Microsoft -
22
5
111
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 month
Conversation with a VC last night... VC: Oh, you know some about Postgres Me: Yep VC: I was at LinkedIn way back, we bet on MySQL Me: Not crazy for that time VC: Postgres really came out of nowhere in last few years, any thoughts on how that happened? Me: How much time you got?
15
3
113
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 years
Funny thing is if you learned SQL 15 years ago it’s just as valuable today, that’s rare for a programming lang to retain that kind of value
6
56
108
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
If I were a VC or PE I'd be pulling together some money to see if I could buy Heroku off Salesforce. It still solves a problem that nothing else has come close to at that scale. (Lots of earlier smaller players, but if you want to place a big bet it would be a good one)
10
8
110
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
25 days
The number one cause of production database outages I see these day is because of CDC tools. Generally the lifecycle of a tech company goes something like: We start building an app and choose Postgres (duh.) Fast forward a little and "we need to get insights to the business".
16
17
103
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
5 years
Give me back my monolith:
6
38
99
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
Said it before, but (cause people) feel like I need to say it again... the make money stack: Rails/Django and Postgres Throw in tailwind for design for good measure It just works. You can build a really good business that way.
7
7
98
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
Code is easy. People are hard.
6
16
98
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 years
Welcome to the newest member of the family
Tweet media one
45
0
95
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
11 months
Pgbouncer getting prepared statement support may be the biggest thing for Postgres since JSONB support
2
3
89
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
Did you know you can name/save queries in your psqlrc that are common database tasks? Inside your psqlrc: \set long_running 'SELECT pid, now() - pg_stat_activity.xact_start AS duration, query, state FROM pg_stat_activity WHERE (now() - pg_stat_activity.xact_start) > interval ''5
2
22
89
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
pg_stat_statements - easily most useful Postgres extension that exists. Without becoming an expert in Postgres you can still get a sense of how queries perform and what to optimize -
1
19
85
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
5 years
Repeat after me: New shiny tech/framework does not magically solve all the problems from yesterday, it is more likely a layer of abstraction and complexity. Boring tech is great for building real businesses.
4
19
82
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
IOPS are a thing that baffle a ton of folks, providing massive IOPS out of the box for all Bridge customers has been one of the single biggest performance wins our customers see in migrating to us. Here we breakdown IOPS and what it means for your DB -
2
21
84
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 months
What you should do to preemptively help future performance on a new Postgres database? These tips will save the day for you when you need to investigate performance, spend 5 minutes now and get your database production ready. 1. Install pg_stat_statements, no matter what it'll
5
14
84
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 years
Also we couldn’t have gotten this far without Postgres and the community itself so especially excited for this to have been a thing -
4
19
81
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Just heard from a customer that migrated to us from Aurora because they were having connection management and scaling issues on it. What solved their problems? Vanilla Postgres. You probably don't need Amazon or Google scale, you just need Postgres.
2
9
77
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Just Postgres.
Tweet media one
4
11
76
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
10 months
Few Postgres psql config recommendations (set in your .psqlrc in your home directory): \set QUIET 1 \pset null '👻' \x auto \timing \set HISTFILE ~/.psql_history- :DBNAME \set HISTCONTROL ignoredups \set COMP_KEYWORD_CASE upper \unset QUIET
3
13
76
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 months
Tech is a very small world, treat people well, do good work. The game is a lot longer than you think and you'll reap benefits for doing the right thing or pay the price for taking shortcuts.
6
10
75
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
5 years
It is well known I’m a psql guy personally, but super excited to see @Microsoft bringing some of their expertise of graphical editors to the @PostgreSQL community -
4
25
74
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
Devs enforcing constants at the app layer and not the database
4
10
74
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
If you're on Heroku: Rotate all config var creds. Change password. Rotate API Key and 2FA. Audit as much as you can of Heroku releases and deploys. It's not gonna be fun, but do it.
1
31
72
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Have a cousin in college that took a DB course, they just shared their slides and lab exercises with me. No wonder devs hate databases and SQL, we can do so much better on educational content. Anyone have favorites for learning SQL/DBs?
28
10
69
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
23 days
Postgres for analytics has always been a huge question mark. By using PostgreSQL's extension APIs, integrating DuckDB as a query engine for state-of-the-art analytics performance without forking either project could Postgres be the analytics database too? Bringing an analytical
4
9
70
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Tweet media one
2
9
69
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Feels like we're breaking every rule of "don't do this with Postgres" @crunchydata and it's working out just fine. Using it for analytics/metrics✅ Storing logs in it ✅ Launching docker containers from inside it ✅ Running with pl/python ✅
7
9
69
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Ingesting 50m events per day, on a $190 a month database, providing dashboards and reports ranging in response time from 1-2ms up to 100ms all depending on the range and amount of data reported back, here's how. Along with future optimizations -
2
13
68
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Postgres 16 has a new feature count of 200! For a "boring old database" that "just works", 200 new features in a release.
2
12
66
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Pro-tip #PostgreSQL tip, trying to use psql more, but still missing a richer editor when writing SQL? Set your $EDITOR or $PSQL_EDITOR to the editor of your choice. Then use \e to open the last executed SQL in that editor, close and save, it'll execute the query.
4
13
65
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
To recap: ✅ pg_stat_statments ✅ log queries over 100ms ✅ log explain plan of queries over 100ms ✅ auto-kill queries over 30s And your Postgres will be 💯
2
7
66
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
Happy Postgres 14 release day (). Excited to already have it officially supported on Crunchy Bridge (). If you want to get your hands dirty with PG 14 feel free to create and account and give it a spin.
2
13
65
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 months
RIP Heroku Postgres
8
3
64
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
21 days
For as powerful as it is, SQL isn't exactly a user friendly language to work in. Debugging SQL can be slow and painful. But, you can write more legible SQL by taking advantage of one of the least used functionalities: CTEs (Common Table Expressions). CTEs are essentially a
3
14
64
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
@isamlambert Yeah, just needs dark mode
2
0
63
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
Tell me you’re a Postgres fan without telling me you’re a Postgres fan
84
3
61
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Working on something fun for @crunchydata website update that I think will be one of the most useful Postgres resources in a single place over past 10 years. Few weeks off, but this should be fun to get out the door. 🔥
Tweet media one
3
8
59
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
There are lot of interesting trends in the data space lately, here’s just a few that are going to displace relational databases a 🧵
8
5
59
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
1/ In every startup I've ever encountered the most challenging thing is focus. The first step is to understand what you're building, what your model is, and then how you sell it. Once you do that perfect it.
2
4
58
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
I frequently get on calls with folks wondering how their Postgres database is doing, this is the playbook I run through in 10-15 minutes for how healthy things are and finding low hanging fruit -
2
13
59
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
My tweet on what could be improved in Postgres got way more response than I anticipated. While I agree with a ton of it, feels worth laying out Postgres is awesome, so here goes:
6
16
57
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
One of the biggest features that we were wrong about at Heroku Postgres was dataclips. It was the vision of a single person that pushed it through against all the collective teams opinion.
8
5
57
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 months
Beyond excited to announce the release of Crunchy Bridge for Analytics–easily working with your data lake. You get the Crunchy Bridge experience plus * Seamless S3 integration * Easily query CSV/Parquet data * Vectorized query execution All in Postgres -
3
12
56
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
I have failed as a parent... My daughter just now: Jedi's don't have powers they just use lightsabers I'm taking tomorrow off and my kid is gonna be out sick, we're starting at episode 4 at 7am...
2
0
55
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
4 years
I bet most folks didn't even know there has been an entire machine learning extension () for Postgres for 10 years now... Why? Because none of the providers of Postgres have supported it... Changing that starting today -
3
16
53
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
8 months
Tweet media one
1
3
55
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
🧵 on all the terrible things about Postgres:
10
8
54
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Want advice to help your team ship as an engineering manager? Here's your cheatsheet, every one of these is pure gold -
0
7
52
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
9 years
End of an era, final day at @heroku
25
2
52
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
8 months
Me when someone says Postgres
2
2
52
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 months
Back at Heroku when we built dataclips most of the Heroku Postgres team was against it and thought it was a terrible idea. One person on the team pushed it through. The rest of the team was wrong, it turned out to be brilliant, like github gist for your data–against a live
5
3
53
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
3 years
Thinking about my angel investment thesis... tempted to go with I invest in the make money stack "Rails/Django, Postgres/MySQL, Heroku, GitHub" If you're building on this you've just increased your chances of success 10-fold
5
5
53
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Postgres 15 available available on @crunchydata about 5 hours after the community release.
Tweet media one
3
9
53
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
10 months
Lots of talk with customers lately about multi-tenant database design patterns, took a few minutes to highlight the approaches with a special guest star of Citus -
2
5
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Lots of backchannel talk on @heroku . Many of us don't want to speak out when things happen, incidents happen, it sucks. But let them manage it and root for them. But a lot of us feeling strong sense of responsibility to what we once built because the comms/response not okay.
1
1
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
It's at least once a week I talk with someone that "loves Postgres" but isn't sure why... which evolves into me ranting for 2 minutes on all the awesome features. In hopes sharing a little broadly here it goes 🧵
4
7
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 months
Gonna pour one out for Simon tonight, had a huge impact over a very long committed period to Postgres -
2
7
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
A launch is distinct from shipping. You can ship any time, launches are coordinated. You can launch after you ship.
3
8
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
7 years
Always a good idea to periodically check your bloat of your Postgres database, here’s a query to help:
Tweet media one
3
16
51
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
2 years
Tweet media one
0
6
50
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
6 months
Want a tip as a early in your career developer, learn SQL. You'll have this mysterious super power that most others on your team don't comprehend.
2
5
48
@craigkerstiens
Craig Kerstiens - Finger lime evangelist
1 year
Having a lot of conversations with folks lately "can Postgres be used for metrics/analytics?" Short answer is yes. Some deeper blog posts coming, but we dogfood our own stuff @crunchydata and just checked... we're handling 50m events daily currently for Crunchy Bridge.
4
5
48