Reputation
2,134
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
5 19
Newest
 Caucus
Impact
~110k people reached

9h
comment Stored procedure with recompile
Not sure what's wrong with with recompile. MSDN refers to it in the context of parameter sniffing: msdn.microsoft.com/en-us/library/ms190439.aspx It's not fine-grained or elegant but it gets the job done.
Jul
28
awarded  Caucus
Jul
18
comment How to validate column while creating Table?
Security is not the right way to defend yourself against developers. Write a script that periodically checks for non-conforming tables and emails the DBA's,
Jul
18
comment Restore a large number of transaction logs
+1 I can see why the use xp_cmdshell might lead to downvotes, but this sounds like exactly the time and place for quick & dirty :)
Jul
17
comment Finding optimal indices, different query competing indices
@mark: A temporary table lives just as long as the transaction. Postgres creates temporary tables under the hood to store the results of joins, hashes, subqueries and so on. We have queries with temporary tables that run 50 times a second.
Jul
16
comment PostgreSQL, merge join results
What output would you expect for a user who has a matching row in both the study and the job table?
Jul
16
revised PostgreSQL, merge join results
added 22 characters in body
Jul
16
comment Filter and append data to row
@ErwinBrandstetter: Looks like json_agg supports an order by clause, like json_agg(row order by row.col1)! That avoids the "will usually work" part.
Jul
16
revised Filter and append data to row
added 408 characters in body
Jul
16
revised Filter and append data to row
added 3 characters in body
Jul
16
comment Filter and append data to row
Wouldn't the query optimizer be free to drop the order by in the subquery?
Jul
16
revised Filter and append data to row
added 114 characters in body
Jul
16
revised Filter and append data to row
added 639 characters in body
Jul
16
answered Filter and append data to row
Jul
16
answered Finding optimal indices, different query competing indices
Jul
1
revised PostgreSQL doesn't log
deleted 22 characters in body
Jun
29
comment PostgreSQL doesn't log
@dezso: That is unlikely... did you test with sudo -u postgres echo hi > /tmp/test.txt? That runs echo as postgres but the redirect as root. The correct syntax is sudo -u postgres bash -c 'echo hi > /tmp/test.txt' and it should show a "permission denied" error.
Jun
29
revised PostgreSQL doesn't log
added 60 characters in body
Jun
29
answered PostgreSQL doesn't log
Jun
21
comment Is there a way to add a column to a table without affecting performance?
On a busy Postgres system adding a column might never get through. I've had to firewall out all clients to get the exclusive lock required. By contrast, SQL Server blocks new locks until the alter has gone through. Surprisingly different behavior!