145 reputation
18
bio website localhost
location Switzerland
age 32
visits member for 2 years, 10 months
seen Oct 15 at 15:40
Mind the gap.

Oct
3
comment How can I call a remote User Defined Function with Parameters?
@gbn: No you can't, exec requires a stored procedure, not a table-valued function.
Jun
18
suggested suggested edit on SQL query slow-down from 1 second to 11 minutes - why?
Jun
13
comment How can I convert a string to a double precision in PostgreSQL?
This is also true for T-SQL, by the way.
Sep
26
awarded  Notable Question
Sep
17
awarded  Teacher
Sep
17
answered PostgreSQL: Creation date of a table
Feb
13
awarded  Popular Question
Jul
21
awarded  Excavator
Jul
21
awarded  Editor
Jul
21
revised How do I list all databases and tables using psql?
added datistemplate = false, otherwise you get the template dbs as well
Jul
21
suggested suggested edit on How do I list all databases and tables using psql?
Jul
21
awarded  Supporter
Mar
26
awarded  Student
Mar
26
awarded  Scholar
Mar
20
accepted SQL query slow-down from 1 second to 11 minutes - why?
Mar
20
comment SQL query slow-down from 1 second to 11 minutes - why?
Great answer. And thanks for the side note, that's a nice catch. I think for the time being I feel safer keeping the older version for SQL Server instead of creating a persistent/tem table. I intend to replace sysobjects with sys.objects. Hopefully no bad surprises there. A CTE hint would indeed be good, given the fact that the optimizer is, unlike its pg counterpart, not intelligent enough to recognize this automagically. BTW until now I didn't realize one can export the execution plan as image. One of the 4 things I learned from this post - thank you.
Mar
19
comment SQL query slow-down from 1 second to 11 minutes - why?
@Martin Smith: Exactly, in which case it would be an optimizer bug.
Mar
19
comment SQL query slow-down from 1 second to 11 minutes - why?
@Martin Smith: True, but that shouldn't make a difference of 10+ minutes. BTW I did try to remove sysobjects, by trying to replace it with information_schema, for which, unlike sys.objects, MS cannot reserve itself the right to change it fundamentally without notice.
Mar
19
comment SQL query slow-down from 1 second to 11 minutes - why?
Information Schema is not left for compatibility, it's part of the SQL standart (92+) ...
Mar
19
comment SQL query slow-down from 1 second to 11 minutes - why?
@Brandon Moore: As Lieven says (only as long as every additional condition is and, if it was or, it would need to be 1=2), but mainly for me in order to quickly be able to comment out any and condition without generating a syntax error, for testing purposes.