Reputation
17,342
Next tag badge:
92/100 score
20/20 answers
Badges
4 44 90
Impact
~1.5m people reached

3h
revised pgsql select distinct on multiple columns
added 38 characters in body
4h
answered pgsql select distinct on multiple columns
1d
comment Copy a large data from sql query result
This has been flagged as 'spam', probably because it's your only post and it's promoting your own product. I'm not deleting the answer because I think it's a genuine attempt to help (and CSV can easily be imported into Excel), but please have a read of the meta Q&A on "What is acceptable self-promotion here on DBA.SE"
2d
comment How to solve UTF8 invalid byte sequence copy errors on a restore, when the source database is encoded in UTF8?
OK, but the OP says "the original database is in UTF8" - interesting info about unicode, have you got a link by any chance?
2d
revised How to select the first row of each group?
http://chat.stackexchange.com/transcript/message/21831139#21831139
2d
awarded  Popular Question
May
25
awarded  Nice Answer
May
25
revised How to select the first row of each group?
tweaked
May
25
revised How to select the first row of each group?
rolled back to a previous revision
May
25
revised How to select the first row of each group?
rolled back to a previous revision
May
25
revised How to select the first row of each group?
simplified by removing the more complex example - this is now really the canonical way of doing this
May
25
comment Multiple database directories with postgresql
I would have thought upgrading would be harder from source, but it depends on your skills I suppose (I assume you mean a major version upgrade). Are you planning to recompile every time there is a security fix? That's much easier using the repos, just apt-get upgrade..
May
24
revised When Should You Shrink Your Database
edited tags
May
24
comment Multiple database directories with postgresql
out of curiosity, why install from source? Postgres provide packages for 14.04 and 9.4
May
24
revised PostgreSQL: options for large table
added vital info from comments
May
24
comment PostgreSQL: options for large table
this will open you up to a whole new world of pain
May
24
comment PostgreSQL: options for large table
this will gain you nothing because if you partition by snp_name you are still going to take 5 hours to insert your 1,000,000 rows into that table.
May
24
comment PostgreSQL: options for large table
For example you may be able to live with an index on the first n chars of snp_name - quicker to insert into and can give you a partial speed-up when querying. What kind of values does snp_name hold?
May
24
comment PostgreSQL: options for large table
OK, that explains it. Presumably those snp_name values for one insert are distributed randomly/evenly throughout the index? In which case you are doing up to 1,000,000 writes which is going to slow you down. If you decide you can live without querying by snp_name, then just drop the user_snps_new_snp_name and you are done - don't muck about with partitioning, that will gain you nothing here.If you can't live without querying by snp_name then you will need to look at options for doing so another way.
May
24
revised How to execute two transactions concurrently in PostgreSQL?
edited tags