Reputation
Next tag badge:
733/1000 score
223/200 answers
Badges
7 32 55
Newest
 Revival
Impact
~595k people reached

Feb
4
comment How to estimate reindexing time?
How much data do you load in that nightly process? BTW, these wide tables are sometimes divided into two, where the 'main' table has all the frequently needed stuff, with all the rest in the other part. If you care to share the table definition, all doubters could be sure if your design is the right one, BTW. Oh, and do you see autovacuum/autoanalyze working hard while your queries are slow?
Feb
4
comment How do I set the isolation level for SELECT statement?
@GoloRoden not necessarily - if some other transaction commits before the second SELECT starts, the two may see different data. In this case, you might need REPEATABLE READ.
Feb
4
comment Creating index using dynamic SQL
Please check what the format() function does and use it. Gives a much cleaner feeling.
Feb
4
comment Execute system commands in postgresql
Please note that this can also only be run with superuser rights (or using SECURITY DEFINER).
Feb
3
comment How to estimate reindexing time?
You can possibly try one index - check its size, REINDEX with measuring the time needed. Then calculate the total size of your indexes and do some math.
Feb
3
comment Fatal error when not numeric value - PostgreSQL 9.2
I am wondering if this query can produce that error. You mention an UPDATE in your first sentence - where is it?
Feb
3
comment Trigger for removing group with no users left in
What you say is also an option, in some cases it might be even better. Care to post it as an answer? Re: the mutating table problem you can prevent from happening by tracking trigger depth, in newer versions. What's more, the table to be changed is different from the one the trigger is defined on.
Feb
3
comment Stored procedure vs transaction anomaly
What is the autocommit setting (I guess you connect to the DB using JDBC)?
Feb
3
comment Plpgsql (Postgres) function for sanity check
'The rows are not allow to be 0' - what exactly cannot be 0? or NULL, maybe?
Feb
3
comment Index has no gain vs normal query
There is no such thing as order in a table (unless you've freshly clustered it).
Feb
2
comment Some delays in heavy inserts
Can you start logging about checkpoints? log_checkpoints has to be set to on in postgresql.conf and you need a restart. You might be interested in anarazel.de/talks/berlin-meetup-2016-01-26/io.pdf (see the throughput/latency graphs)
Feb
1
comment Some delays in heavy inserts
Please show the non-default contents of your postgresql.conf. It can be related to the checkpoint settings, among others.
Feb
1
comment Postgres, promoting slave to master issue
Does the recovery advances through the WAL files (you can see this from the 0000000100000EF200000019 changing to something higher). If the slave is much behind the master at the time of promotion, it can take a while until it catches up. What you tell about the slave having different data than the master, this seems likely.
Jan
29
comment Insert performance
Does it stay the same after adding an index on words (doc)?
Jan
26
comment How to improve this union to ensure consistent results?
If I understand the idea correctly, this answer might help: dba.stackexchange.com/a/123836/6219
Jan
26
comment Database: One table or many
@Shafee Daniel just gave you a rough solution, see the last paragraph. JSON is very important, and it is very useful when used right.
Jan
26
comment Maintaining SQL Server 2008 R2 on Windows 10
What does your answer add to @Shanky's?
Jan
23
comment Is there some kind of table-level replication in PostgreSQL?
Could you be slightly more specific on what 'weird' means and how it is checked?
Jan
22
comment Passing ROWTYPE parameter to EXECUTE
I know this does not answer the question, but please consider upgrading your DB - it is currently 7 versions behind.
Jan
21
comment Dealing with partitioned tables in Postgresql
Again, if I understood correctly, they already jumped :) Otherwise, I agree.