Reputation
19,026
Next tag badge:
98/100 score
20/20 answers
Badges
5 52 99
Impact
~2.2m people reached

Nov
29
revised Can I install SQL Server Management Studio locally?
edited tags
Nov
25
revised Restrict Postgres roles by IP address outside of the pg_hba.conf file
inlined code — much easier to see it here than to have to visit an external link
Nov
25
comment mysql not using index on production query, yet does on staging and local
@3manuek thanks for contributing, I've changed it into a comment for you. I hope you stick around for more Q&A — getting enough rep to comment is a very low bar.
Nov
23
awarded  Good Question
Nov
21
revised Why MySQL is still “using temporary” when update by primary key?
edited tags
Nov
19
comment “ERROR: there is no parameter $1” in “EXECUTE .. USING ..;” statement in plpgsql
@Erwin reopened :)
Nov
18
comment PostgreSQL: labels vs columns
depends — if you mean you are seperately querying on date then you want a seperate index, if you mean you are quering like select baz from my_table where date=X and foo=1 then you might want date in the same index.
Nov
18
comment PostgreSQL: labels vs columns
but please please don't use date and value as your actual column names of course!
Nov
18
comment PostgreSQL: labels vs columns
If your queries are of the form select baz from my_table where foo=1 then an index on foo,baz would be appropriate. Your other design might have an index on foo,label,value. Query would be something like select value baz from my_table where foo=1 and label='baz'.
Nov
18
comment PostgreSQL: labels vs columns
It may well make no difference how large the datasets are if they are indexed properly (eg take a look at covering indexes: en.wikipedia.org/wiki/Database_index#Covering_index)
Nov
18
comment PostgreSQL: labels vs columns
"While the latter is better normalized" is it? Only if at least one of bar, baz and boo can be null, is that actually the case? "finding all baz values when foo = 1" is likely going to be fast enough either way if you index foo/value.
Nov
18
revised Difference between database vs user vs schema
tweaked to emphasise that this is a common way of using the terms, not just made up.
Nov
17
revised MySQL Query/Connect to eximstats?
deleted 42 characters in body
Nov
17
revised Difference between database vs user vs schema
deleted 14 characters in body
Nov
16
revised How to create an UTC index from a 'DATE' typed column with Oracle?
added 1 character in body
Nov
16
comment sqldeveloper ORA-12505. TNS: listener does not currently know of SID given in connect descriptor
This is bound to trip others up so its very useful to have it on the site, thanks for taking the time to post it well-researched.
Nov
13
revised MySQL shows previously deleted data
added 468 characters in body
Nov
13
revised BACKUP Detected Corruption in the database log
added 87 characters in body
Oct
30
comment SELECT from Function that return CURSOR
any chance you can expand this answer to explain why you think it will work (especially after reading Mat's link in the comments)?
Oct
29
revised SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '511900441' for key 'PRIMARY'
re-phrased so it's not a question