Reputation
14,611
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 28 54
Newest
 Yearling
Impact
~856k people reached

Apr
13
comment In Postgres, what is the relationship between a SEQUENCE and a SERIAL?
The link to the manual that you posted explains that in detail
Apr
13
comment Transactional DDL workflow for MySQL
You can always upgrade to Postgres - it does support transactional DDL (SCNR).
Apr
13
comment Can a slow SELECT statement in READ COMMITTED isolation level read content from concurrent committed UPDATE?
You should add which DBMS you are using (Postgres, Oracle, ...). But in general the DBMS should present a consistent view of the data at the point when the statement started. But not all DBMS actually do that.
Apr
13
comment Oracle: guaranteeing unmodified database state with queries?
With 12c, WITH can include a procedure definition, so it won't be safe either: docs.oracle.com/database/121/SQLRF/…
Apr
13
comment Oracle: guaranteeing unmodified database state with queries?
Ah, right. I wasn't thinking of autonomous transactions.
Apr
12
comment Oracle: guaranteeing unmodified database state with queries?
I don't think you can call a function in a SELECT statement that changes the database.
Apr
11
comment Query across schemas in PostgreSQL
The number of schemas is irrelevant for the performance of a single query. A query accessing table from many schemas is not slower than the same query accessing tables from a single schema. As it stands your question is impossible to answer.
Apr
11
comment Query across schemas in PostgreSQL
wiki.postgresql.org/wiki/Slow_Query_Questions
Apr
11
comment Simple join in postgresql
explicit joins have nothing to do with optimization or performance. They are about coding style and robustness. With implicit joins it's very easy to forget the join condition and create a cross join without intending it. This is not possible with an explicit JOIN. Do get used to it even for only two tables.
Apr
11
comment Simple join in postgresql
While I agree that using explicit joins is better, the example shown does not create a cartesian product because of the old-fashioned implicit joins in the where clause
Apr
11
comment Simple join in postgresql
Please show us some sample data and the output you get (e.g. copy and paste the console output - as text not as a screenshot please)
Apr
10
comment Postgres privileges: psql \dp - what is about the plus-sign
Ah, you mean that plus sign. I think that's just the indicator that the data spans more than one column. You'll get that with other multi-line values as well, not just the output of \dp
Apr
10
comment SELECT rows with duplicate values
Which DBMS are you using? Postgres? Oracle?
Apr
10
comment Postgres-XL does not insert rows
Does a simple insert into test1 (id, profile, status, switch_date) values (...) work?
Apr
9
comment Alternative approaches to “primary” record in child table
You can create a filtered unique index to make sure only a single isPrimary exists per customer: create unique index on addresses (customer_id) where isPrimary = 1
Apr
8
comment Is SQL injection a neccesary feature?
"exists because it is possible to execute multiple SQL commands in a single request" - that's not the only way to do it. Think about injecting the condition 1=1 to a query that checks the password: only a single query, but still a SQL injection that will give you access to the system without knowing the password.
Apr
8
comment How to correctly use PostgreSQL to limit multiple and/or concurrent executions of a task
"advisory locks won't help to expire the lock automatically" - how would the lock obtained through an UPDATE expire automatically? If the update is never committed, it won't expire either. Or am I missing something?
Apr
7
comment Replace SQL Server with another DBMS
You might be interested in this: datachomp.com/archives/im-leaving-sql-server-for-postgres this: datachomp.com/archives/… and this: facility9.com/2011/12/… (oh: and what exactly do you consider "huge"?)
Apr
6
comment Scalable Relational Database Design
@JohnDorian: not directly related to this problem, but you might want to re-think your choice of MySQL. It lacks many modern SQL features
Apr
6
comment set session - custom variable to store user id
I think the restriction that myapp.user has to be declared in postgresql.conf was removed in 9.2 or 9.1