Reputation
18,914
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
4 36 67
Newest
 Enlightened
Impact
~1.4m people reached

Feb
3
comment Stored procedure vs transaction anomaly
now() and current_timestamp return the time at the start of the transaction. See the manual for details
Feb
3
comment How to improve a sql query
Show us the complete execution plan
Feb
3
comment Index has no gain vs normal query
Please show us the execution plan using explain (analyze,verbose). Edit your question, formatted text please, no screen shots
Feb
1
comment Data structure design for supporting arbitrary number of columns in table or database
Apart from Postgres' "NoSQL" features like hstore and json you could read up on an anti-pattern named "entity-attribute-value" (EAV). Be sure to understand the problems that model gives you before you implement it (I would always prefer a hstore over that)
Feb
1
comment Data structure design for supporting arbitrary number of columns in table or database
That's a complete shop solution written in PHP - it's not a DBMS (plus it doesn't support Postgres which addictedtohaskell is using). It most likely uses an anti-pattern known as "entity-attribute-value" to store those attributes in the database.
Feb
1
comment Some delays in heavy inserts
So which part is slow? The "moving" to the archive table or the insert into the working table? Did you consider partitioning on the date column?
Feb
1
comment PostgreSQL surrogate keys: use sequence/bigint or OID?
OIDs are deprecated, don't use them. Use a bigserial
Feb
1
comment I don't want to have the error when I drop a table although the table doesn't exist
Cross post: stackoverflow.com/q/35128900/330315
Jan
31
comment Can Oracle 11g Express Edition Work on Parallels
You can also just download a pre-configure VirtualBox image: oracle.com/technetwork/database/enterprise-edition/…
Jan
28
comment Three Vital Postgres Columns Corrupted
What is your exact Postgres version?
Jan
28
comment Why does this PostGIS query take so long to run?
Btw: the distinct in the sub-query is useless and can be removed (but Erwin's query is even better)
Jan
28
comment Why does this PostGIS query take so long to run?
Check the execution plan using explain (analyze, verbose)
Jan
27
comment How to get capacity specifications for a particular Oracle release?
The answer to all of that is essentially: "unlimited". I would start looking in the Concepts guide, most probably it's documented there. Note that in Oracle you usually don't create more than one "database". A "database" in Oracle is something completely different than a "database" in Postgres, SQL Server or MySQL
Jan
26
comment Is there any scenario where the existence of one or more Indexes in a table can prejudice it?
An index can improve the speed of an update or delete statement, the same way it improves the performance of a select statement: when the index helps in identifying the affected rows. delete from foo where some_column = 42 will be faster if an index on some_column exists and the condition only affects very few rows
Jan
26
comment In Oracle what is the difference between STDEV and STDEV_SAMP functions?
Cross post: stackoverflow.com/q/35010334/330315
Jan
26
comment Permission error when executing a 5.6 GB sqlcmd file
Sounds as if sqlcmd can't handle files larger than 4GB but I don't think this has something to do with the express edition. Do you have a standard or enterprise edition around to verify that that sqlcmd can open that file?
Jan
26
comment In Postgres, is it possible to get all rows from a table where a column can be cast to a different type?
@JoishiBodio: the regex in the where clause would probably be slightly faster because the overhead of calling a function isn't there. But then, SQL function might be "inlined" so maybe there isn't any overhead. If this is a quick one-time thing, I wouldn't use the function. If that is something that is used a lot, I would use the function, so that I have a central place where the check is maintained.
Jan
21
comment Compare the tablespace concept between Postgres and Oracle
long bytea (the equivalent to BLOB) and text values are stored in the TOAST area. I believe that is always the same tablespace as the table is using.
Jan
21
comment ROUND function behaviour with dates
Show us your "rounding" code.
Jan
20
comment PostgreSQL - Are CREATE FUNCTION and DROP FUNCTION locking when used inside different transactions?
Yes of course the other transaction will wait. (Nearly) Every DDL statement takes an exclusive lock on the object being modified (dropped, created): postgresql.org/docs/current/static/explicit-locking.html