1,695 reputation
416
bio website
location Netherlands
age 41
visits member for 3 years, 10 months
seen 58 mins ago

I'm a software developer at a telco supporting line-of-business applications. We use a variety of technologies from ASP.NET to Perl. I've come to appreciate SQL more over time, and I now spend most of my time in the database.

If you'd like to learn SQL properly, consider the free SQL course from Stanford. For more free online courses awesomeness, check out the list of courses on Coursera and EdX.


19h
comment Monitoring the Postgres query parser
Thanks, love the auto_explain feature! If I start psql, then run a query, the first execution of select * from myfunc(123); is logged as using $1 conditions. How is that possible when, as you say in the first sentence, "Query plans are only ever saved for the current session" ?
1d
comment Monitoring the Postgres query parser
Thanks for your reply. I read the Postgres docs you linked to, but they do not seem contain an answer. I'd like to know if you can troubleshoot or monitor plan caching. If I execute a query, is there a way to tell if Postgres is using a cached plan?
1d
comment Monitoring the Postgres query parser
@a_horse_with_no_name: Thanks, that logs information about the CPU and file I/O per query step. The "PARSE ANALYSIS" "elapsed" value is lower for consecutive invocations. But there is no log that says if the plan cache was used, and it would be difficult to monitor. Is there a system view that provides information related to the query parser?
1d
asked Monitoring the Postgres query parser
Sep
30
awarded  Explainer
Sep
24
awarded  Autobiographer
Sep
16
revised What exactly does the last_value() window function do?
Added the relevant quote from MSDN (from Mikael Eriksson's comment) and how that means partition and order by no longer matter
Sep
16
accepted What exactly does the last_value() window function do?
Sep
16
suggested approved edit on What exactly does the last_value() window function do?
Sep
16
comment What exactly does the last_value() window function do?
@Leo: If the range ends at "current row", the last_value() must by definition be the current row. So that does explain why neither sort order nor partition matters with the default range.
Sep
16
asked What exactly does the last_value() window function do?
Aug
20
answered Need some help with this query or some ideas for change it to better model
Aug
7
comment Transaction log full due to log_backup
That's an ok log-reuse-wait reason. Hmmm... how's your tempdb doing? That might be used during a rebuild too.
Aug
7
comment Transaction log full due to log_backup
Agree, what does the log_reuse_wait_desc column in sys.databases say?
Aug
7
comment Transaction log full due to log_backup
From your screenshot, log growth is limited to 2 terabytes. That's probably not the problem tho. What does the log_reuse_wait_desc column in sys.databases say?
Aug
5
accepted Why can a new user select from any table?
Aug
4
comment Why can a new user select from any table?
@ErwinBrandstetter: Thanks. Is it true that if \l or \dn+ displays empty access privileges, that is the same as postgres=UC/postgres, =UC/postgres ?
Aug
3
comment Why can a new user select from any table?
After revoke connect on database testdb from test, the test user can still connect to testdb. It seems you can't overrule grants from public then?
Aug
2
comment Why can a new user select from any table?
Thanks. I won't be able to revoke privileges from public as that would affect other users. Is there a way to deny rights to a particular user, in effect overruling the grant from public?
Aug
2
revised Why can a new user select from any table?
added 267 characters in body