Reputation
15,099
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 29 56
Impact
~936k people reached

May
7
comment I want to start the Postgres database
It doesn't "hang". From the manual: "By default postgres starts in the foreground" - so your command starts it in the foreground and thus your console is "blocked". It's better to use pg_ctl to start it in the background or use the wrapper script provided by your Linux distribution (e.g. service postgresql start)
May
6
comment How to atomically replace table data in PostgreSQL
If you use delete instead of truncate it will be slower, but without blocking readers. How many rows do you need to delete?
May
6
comment Is there any point in specifying the precision and scale of a number for a foreign key?
I did read the the link and I'm surprised. It apparently has something to do how an expression is evaluated. Just wanted to add that a number column does not have a fixed size - similar to the way e.g. a varchar works.
May
5
comment Is there any point in specifying the precision and scale of a number for a foreign key?
number is a variable length data type. So x1 will take up to 21 bytes. If you store the number 42, it will take exactly the same space in x1 and x1
May
4
comment Having issues with a CTE in a Nested Join
"hen get a syntax error stating it is expecting that the previous statement must be terminated with a semi-colon" - well then do that. A ; ends a statement. Putting it in the middle of a statement does not make any sense.
May
4
comment How to insert multiple returns of the select statement?
Which DBMS are you using? "SQL" is not a DBMS - it's query language
May
4
comment Transfer data to New Laptop
Use pg_dump and pg_restore. @AhmadAbuhasna: please do not link to completely outdated versions of the manual. 8.1 is long dead and forgotten. It's better to use current instead of the version number
May
3
comment Logic Value of Assignment Expression
Which DBMS are you using? @prevNum = .. is non-standard SQL (i.e. invalid for most DBMS). And what exactly is the "leetcode SQL problem"?
May
2
comment How to know how long my server is started
@Vérace: see my edit
May
2
comment How to know how long my server is started
@Vérace: the expression returns an interval so you can use all the functions available, specifically extract(epoch from ...) to get seconds
May
2
comment Inbound Outbound Shipping Database
Which DBMS are you using? Postgres? Oracle?
Apr
30
comment PostgreSQL 9.0 live migration/replication with native/bucardo between multiple architectures
Setting up a trigger based replication (which is your only choice) will need new "software" on the live server - albeit "only" SQL code. As you are upgrading to a also somewhat outdated version you can make use of parallel pg_dump and pg_restore either. You could try to pipe the output of a pg_dump directly into a psql connected to the target server. That should be a bit quicker than dumping to a file and restoring the file.
Apr
30
comment PostgreSQL 9.0 live migration/replication with native/bucardo between multiple architectures
As you are switching between two architectures (32 -> 64bit), you can not just copy the data directory and I think pg_basebackup will also not work in that case because it also "just" does a binary copy.
Apr
30
comment how to extract an integer from a column having an xml of clob data type?
Which DBMS is it? SQL Server or PostgreSQL?
Apr
29
comment Is using ASM a pre-requisite for RAC?
Can you really implement RAC using SE? I thought EE was a pre-requisite for RAC.
Apr
29
comment How to create index on a postgres table as fast as possible?
A SSD would most certainly speed this up. Increasing maintenance_work_mem might help as well. You could try something like set maintenance_work_mem = '1GB' (or even more) before running the CREATE INDEX if that is the only thing going on at that moment.
Apr
28
comment How to create index on a postgres table as fast as possible?
How much memory does your server have? What is the setting for maintenance_work_mem and work_mem?
Apr
28
comment Switching from Oracle database to Ubuntu
There is no such thing as "the Ubuntu range of products". And Ubuntu can not "fullfill the database requirements of a large organization", because Ubuntu is an operating system, not a DBMS. All modern (open source) DBMS do run on Ubuntu, so you just need to pick the DBMS that you want. Postgres would be a good choice.
Apr
28
comment LOAD DATA statement not working in Oracle SQL Developer
There is no LOAD DATA statement in Oracle.
Apr
27
comment To split tables is a good idea?
40 Million is not really that large. With proper indexing you probably don't need to partition your table. But if your query is slow, please read this: wiki.postgresql.org/wiki/Slow_Query_Questions and then post the missing information.