News for hackers. Stuff that matters.
Re:The Art of PostgreSQL by war1025 on Tuesday August 20, 2019 @10:55PM (#20754216)
Looked at the website and didn't really get much of a feel for what was actually in the book.

I will say though, having a good knowledge of SQL (we use Postgres where I work) can help you do some really neat things.

There are probably three or four large new features I've added to our system in the past couple years that have boiled down to "Pre-process the input and then ask Postgres for the answer"

Databases are very powerful. They are even more powerful when you know how to use them right.

Re:The Art of PostgreSQL by pupdogg on Tuesday August 20, 2019 @11:01PM (#20754248)
I couldn’t agree more with your last comment. A lot of folks strive for optimizations in their application language of choice...relying on standard SQL queries (aka joins and unions that fit most use cases but not specific ones). ORMs have also come a long way...but...if you know your SQL, you can be lethal!
Re:The Art of PostgreSQL by trevyn on Tuesday August 20, 2019 @11:23PM (#20754335)
Could you give an example of a “lethal” query?
Re:The Art of PostgreSQL by war1025 on Tuesday August 20, 2019 @11:58PM (#20754459)
Don't know that its necessarily "lethal", but one thing I've learned over the years is to let the database do the calculations for you.

For example, we've had numerous places over the years where we would pull hundreds or thousands of records out of the database, and then process them on the server to get just a handful of result values. Moving the calculations down to SQL saves a ton of bandwidth and also lets the query optimizer make good choices for you.

Learning how to analyze queries and write the proper indexes to make things run fast is also a good skill.

In Postgres, learning how to use the builtin json functions is very helpful too.

Also learning about aggregate functions and things like that.

Really I've found that most of my learning happens when I come across something that people are saying is too slow, and then I read up and think about the problem and usually learn a new trick or two to make everything work a little bit happier.

Also even just the very basic things like properly setting up foreign keys, constraints, etc. can get you a long way. For a long time my coworkers were reluctant to do anything that operated on more than one table at a time. And if they did it was all using ORM magic, which is useful in a way, but also pretty handicapped as far as efficiency.

Re:The Art of PostgreSQL by coldtea on Tuesday August 20, 2019 @11:12PM (#20754287)
>Looked at the website and didn't really get much of a feel for what was actually in the book.

I think they need a more meaty sample chapter than the one they have (first chapter). Also the formatting in the PDF could use some work.

Re:The Art of PostgreSQL by malloryerik on Tuesday August 20, 2019 @11:58PM (#20754460)
>Also the formatting in the PDF could use some work.

Reads pretty decently on a phone, so there's that, and the line numbers in code blocks seem a nice touch.