PostgreSQL Tips and Tricks
blog.gtuhl.com
PostgreSQL Tips and Tricks
1–10 of 29 posts
Re: PostgreSQL Tips and Tricks
#2Re: PostgreSQL Tips and Tricks
#3Any nice reference about pgsql and query optimization? Any book recommendation?
As an old mysql guy, as far as I do db:s, the advice re subqueries (#4) was unusual... :-)
(I looked at trying pgsql for a hobby a few years back and found lacking support for different char sets for different tables, etc. Is that [still] so?)
Re: PostgreSQL Tips and Tricks
#4Re: PostgreSQL Tips and Tricks
#5Some reasonable advice in there, but #3? Ruh roh.
Re: PostgreSQL Tips and Tricks
#6Interesting. Any nice reference about pgsql and query optimization? Any book recommendation? As an old mysql guy, as far as I do db:s, the advice re subqueries (#4) was unusual... :-) (I looked at trying pgsql for a hobby a few years back and found lacking support for different char sets for different tables, etc. Is that [still] so?)
Re: PostgreSQL Tips and Tricks
#7Some reasonable advice in there, but #3? Ruh roh.
It's not particularly bad advice. Perhaps for someone who hasn't worked with databases long enough, it's dangerous to tell them "don't worry about normality." But denormalizing certain groups of tables can certainly cause a significant performance gain.
Most of the serious commercial databases I've worked with/near/on have been de-normalised to some extent.
e.g. SalesForce run massive amounts of data. Their implementation really boils down to one de-normalised table; with a dozen or so supporting tables.
When I hear about some (not all) NoSQL implementations I occasionally wonder why they just didn't adopt a de-normalised SQL solution.
Re: PostgreSQL Tips and Tricks
#8So glad to see PostgreSQL bubbling up these day's as it's been my DB of choice for many years. I'd love to see a more portable version and of course something like mySQL's group_concat(). If you are game for trying it out be sure to check out the tools at sqlmanager.net (unfortunately they don't offer Linux versions anymore).
Re: PostgreSQL Tips and Tricks
#9Some reasonable advice in there, but #3? Ruh roh.
It's not particularly bad advice. Perhaps for someone who hasn't worked with databases long enough, it's dangerous to tell them "don't worry about normality." But denormalizing certain groups of tables can certainly cause a significant performance gain.
* Throw away the normal forms you learned in school
* Denormalize [...] whenever it makes a query faster.
I think that's bad advice as stated. As you imply, you have to know why the rules are there to know when to break them intelligently. I didn't get that message from the item as posted, rather that the author thought that NF had little value, which probably doesn't belong in a list of database tips and tricks.
[edit: format]
Re: PostgreSQL Tips and Tricks
#10So glad to see PostgreSQL bubbling up these day's as it's been my DB of choice for many years. I'd love to see a more portable version and of course something like mySQL's group_concat(). If you are game for trying it out be sure to check out the tools at sqlmanager.net (unfortunately they don't offer Linux versions anymore).
Postgres lets you define your own aggregate functions and has an array type. http://mssql-to-postgresql.blogspot.com/2007/12/cool-groupco...