12,179 reputation
11947
bio website
location Munich
age
visits member for 3 years, 5 months
seen 49 mins ago

Oct
16
comment Where does mysql store data?
@Konrad: that's actually pretty common. Oracle and SQL Server also store everything in a single file (although you can configure them differently)
Oct
16
comment Self Join? Or am I wrong?
I think this is because MINUS was introduced in Oracle long before this was defined in the SQL standard.
Oct
16
comment Self Join? Or am I wrong?
minus is Oracle specific. The SQL standard defines except
Oct
16
comment Postgres top-k with ties
@Alexandros: see my edit. By doing this in two "steps", this *could*(!) be faster. But you will have to check the execution plan with your real life data.
Oct
16
comment Creating a rule increases load disproportionally
How do the involved tables look like? How does the rule look like? What are the statements that fire the rule? How big (=number of rows) are the tables? Which indexes are defined on the tables?
Oct
16
comment Find the sid of suppliers who supply every red part
Which DBMS are you using? Postgres? Oracle?
Oct
16
comment Oracle Concurrent Insertion
Session2 will not hang. Why don't you just try for yourself? This is really easy to test
Oct
15
comment postgresql replace table without losing dependancies
I have never seen a create or replace table in any other DBMS (Oracle, SQL Server, DB2, Firebird, HSQLDB, ....)
Oct
15
comment postgresql replace table without losing dependancies
What's wrong with using ALTER TABLE?
Oct
15
comment Schema setup and versioning for multiple DBMS
Check out Liquibase: liquibase.org
Oct
14
comment Using if statement outside of a stored procedure or function
"Are if statements usable outside stored procedures?" - no
Oct
13
comment work with json in oracle
@drew: I know. This was intended to make Lloyd aware of the subtle difference between .0.2 and .0.1
Oct
13
comment Create a test enviroment in Oracle 10g
Look into the DataPump utility
Oct
13
comment work with json in oracle
@Lloyd: you need 12.1.0.2, the initial 12c release which was 12.1.0.1 did not contain support for JSON
Oct
13
comment Is there a way to store a PostgreSQL database directly on a block device (not filesystem)?
It doesn't really matter, but: why are you reading a manual from an outdated (and unsupported) Postgres version? Oracle is able to store its data on "raw" devices. But I don't see any advantage in that. Plus Postgres relies heavily on the cache of the underlying file-system. Using "raw" devices might have made a difference 20 years ago, but I don't think the filesystem is really a problem nowadays (especially with the number of alternatives to choose from)
Oct
13
comment What's wrong with my DDL statement?
I would start with the chapter "SQL commands" in the manual: mariadb.com/kb/en/mariadb/documentation
Oct
13
comment Is the runtime of checking for duplicate primary keys in SQL Server O(n)?
"In practice it is O(1) because the upper index levels tend to be cached" - the caching doesn't change the complexity. That will still be O(log N). The operations involved are faster, but it still requires the same number of operations.
Oct
12
comment What's wrong with my DDL statement?
What did you find when you checked the manual as suggested by the error message?
Oct
12
comment Is there a faster way to get UNION ALL behavior in Postgres?
I don't see a reason for the union all: select distinct on (t2_id) t1_id, t2_id from t0 will do just fine: sqlfiddle.com/#!15/d41d8/3591 Btw. the parentheses around the individual selects are totally useless for the union
Oct
11
comment How to order by Levenshtein distance?
What about using an order by soundex(name) for the window function?