Reputation
18,814
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
4 35 66
Newest
 Enlightened
Impact
~1.3m people reached

Dec
30
comment CREATE TABLE AS SELECT creates non-nullable columns
I'm pretty sure Oracle does scan the whole result because otherwise it won't be able to actually copy the data. But although I'm pretty sure I have seen this happening, I can't reproduce this on Oracle 12c
Dec
30
comment CREATE TABLE AS SELECT creates non-nullable columns
@AndriyM: I think Oracle decides this based on the values. If a column of the query only contains non null values, the table's column is defined with NOT NULL. If at least one value in the query result is null the column is defined as NULL
Dec
27
comment postgresql columns are inside quotes - “ ” and uppercase but occurs relation does not exist error when queried in java
postgresql.org/docs/current/static/…
Dec
27
comment Key/Value table with limiters
Which DBMS are you using? Postgres? Oracle?
Dec
23
comment Postgres 9.4 won't accept remote connections
"password authentication failed" means you are supplying the wrong (or no) password. It has nothing to do with pg_hba.conf
Dec
23
comment Query to identify people exceeding a particular amount within an interval of 6 months
The question was tagged oracle right from the beginning.
Dec
23
comment Query to identify people exceeding a particular amount within an interval of 6 months
Edit your question and add some sample data and the expected output based on that data. I am also not sure what "within any time period of 6 months" means. Any period of 6 months since the beginning of time e.g. January 2000 to June 2000 and then again between March 2003 and August 2003 and then again between October 2007 and March 2008? Or do you mean "in the last 6 months since today"? Or any customer that exceeded that amount within a specific date range that you specify when running the query?
Dec
23
comment Query to identify people exceeding a particular amount within an interval of 6 months
year(trans_date)+'-' is invalid SQL. + is used to add numbers, not to concatenate strings. For character values you have to use || in SQL. There is also no year() or month() function in Oracle. And the expression case true is invalid in Oracle as well. But even if it was valid, it would make no sense at all because the second part of the case will never be executed
Dec
23
comment PostgreSQL long transaction on a table performance
"Are there any difference across versions" - yes there are. Newer versions are usually faster than older versions. As you are still planning the upgrade, I would suggest to plan for an upgrade to 9.5 which is planned to be released mid of January 2016 (~4 weeks from now). Regarding the question: your first attempt should always use transactions boundaries that are defined by your business requirements, not from some assumed performance impact. If that shows up to be too slow or gives you other problems, then think about doing more frequent commits.
Dec
23
comment PostgreSQL long transaction on a table performance
@BuahahaXD: the amount of "logging operations" when you update 1 million rows is always the same, regardless how often you commit. The database will have to log 1 million updates.
Dec
23
comment UPDATE on column referenced in sub-query
Did you try an exists query instead of the in? Usually the oracle optimizer gets this right, but sometimes the exists equivalent leads to a faster plan. But without any indexes this will never be really fast.
Dec
23
comment If else with 5 possible cases PostgreSQL
Please add some sample data and the expected output based on that sample data.
Dec
22
comment Fastest way to find (rare) rows with a null value among millions of rows?
wiki.postgresql.org/wiki/Slow_Query_Questions
Dec
22
comment How to clean up transaction logs in production database
Which DBMS are you using? Every product has a different implementation of "transactions logs" and will require different strategies to "clean up" (for some DBMS a "clean up" might not even be needed)
Dec
21
comment How autocommit = 1 impacts statements between BEGIN/COMMIT?
As I said: set autocommit is ignored on the server. It has been removed in 9.5
Dec
21
comment How autocommit = 1 impacts statements between BEGIN/COMMIT?
set autocommit = 1; does nothing, it is ignored on the server (it has actually been removed in the upcoming version 9.5)
Dec
21
comment SUM of ever increasing column
wiki.postgresql.org/wiki/Slow_Query_Questions
Dec
18
comment pg_stat_statements not found even with "shared_preload_libraries = 'pg_stat_statements'
Adding shared_preload_libraries is a pre-requisite in order to be able to run create extension pg_stat_statements
Dec
18
comment help in correcting the syntax error of the below create table with as with multiple select
@BriteSponge: it will become a performance problem if the system tablespace grows indefinitely. Especially because you can't shrink the system tablespace later.
Dec
18
comment Using SELECT to call a function in a jdbc migration
That seems a bug with the clojure tool. I guess it runs all migration statements using Statement.executeUpdate() rather than Statement.execute(). Can you wrap the call into a do block and use perform inside the do block? But this should rather be fixed in clojure