Reputation
12,532
Next tag badge:
733/1000 score
223/200 answers
Badges
7 32 59
Newest
 sql
Impact
~665k people reached

Feb
19
comment How to deal with datetime ranges in a table with separate columns for date and time?
This shows that the idea of separating the date and time part was probably not the best one - do you have other usecases to justify it? If not, a small redesign may make your life easier.
Feb
19
comment How to deal with datetime ranges in a table with separate columns for date and time?
You don't really need the date + time structure in the BETWEEN expression, do you?
Feb
19
comment PostgreSQL takes 99,9% I/O?
@Andremoniy In this case, it would be interesting to see your batch job(s) that are slow. Also, you mention 'Database is already tuned as in various manuals described' - add the relevant part of your configuration to your question. Also, some understanding about the HW setup could help, too. For example, are you on a VM of some sort?
Feb
19
comment Bulk insert M:N relation in PostgreSQL
This way you will have duplicate IDs in the person table.
Feb
18
comment Rds snapshot restore time
'You can restore a DB instance and use a different storage type than the source DB snapshot. In this case the restoration process will be slower because of the additional work required to migrate the data to the new storage type. In the case of restoring to or from Magnetic (Standard) storage, the migration process is the slowest as Magnetic storage does not have the IOPS capability of Provisioned IOPS or General Purpose (SSD) storage.' docs.aws.amazon.com/AmazonRDS/latest/UserGuide/… Which instance type(s) are you on?
Feb
18
comment Rds snapshot restore time
Crosspost from stackoverflow.com/q/35490807/246260
Feb
18
comment Where to store data on AWS?
@WillemRenzema exactly this is why EBS is recommended: it is not instance-specific, so it survives an instance crash.
Feb
18
comment Where to store data on AWS?
Just a small note: depending on the instance type, other storage types (SSD and HDD) are available, too. These are not recommended, though: docs.mongodb.org/ecosystem/platforms/amazon-ec2
Feb
18
comment PostgreSQL takes 99,9% I/O?
So, data modification is I/O intensive, yes. And Postgres may be limited by it, yes - however, seeing 99% I/O might simply mean the modifications got all the available resources, because nothing else does anything currently. Do you experience problems elsewhere on the same machine?
Feb
18
comment How does the PostgreSQL query planner estimate the aggregated rows count?
@St.Antario can you post it to explain.depesz.com ?
Feb
17
comment PostgreSQL: How to backup only One Schema from a database and restore it on another server
Isn't this what Peter Eisentraut did in his answer?
Feb
16
comment Msg 21, Level 21, State 1, Line 1 Warning: Fatal error 9001
How is the former better then restarting, what the OP already tried several times? And did you notice that the latter was already said in the accepted answer?
Feb
15
comment Combine various temporal criteria to filter rows
Please show example data and the expected output for a given set of conditions. The details about how the latter is derived from the frontend input are not that useful.
Feb
12
comment Source of error on psql data load
Is there only data in the dump or the tables thenselves, too? Could you show the relevant pieces belonging to either of those two tables?
Feb
12
comment Source of error on psql data load
If the dump is ordered alphabetically, then the error is expected. By consistently, do you mean you always have the same data but the behaviour is different?
Feb
11
comment Reject Specific Database PostgreSQL User Authentication
@NeilMcGuigan thanks for pointing it out - I've updated my answer.
Feb
11
comment Reject Specific Database PostgreSQL User Authentication
@Everlight so you want to prevent an OS user from logging into the DB completely? It sounds like you want to jail him - but then it's not a database administration issue.
Feb
10
comment Importing CSV into multiple tables using PostgreSQL
@NeilMcGuigan Are you interested in posting an answer?
Feb
10
comment Importing CSV into multiple tables using PostgreSQL
And this is what the OP used to use, until they started having two tables...
Feb
10
comment Get rows from last insert statement by specific user
Are those users PostgreSQL roles, or stored in a self-defined user table?