Re: [PERFORM] Evaluation of PG performance vs MSDE/MSSQL 2000 (not 2005)

2007-12-18 Thread Dave Page
Robert Bernabe wrote: > I'm happy (actually ecstatic) to report that Win2kPro + PG performance > is slightly faster than Win2kPro + MSSQL/MSDE. > > Linux(FC7) + PG 8.x performance seems to be 3x faster than Win2KPro + > MSSQL/MSDE for our stored functions. > > Thanks for all the help! Am a belie

Re: [PERFORM] Evaluation of PG performance vs MSDE/MSSQL 2000 (not 2005)

2007-12-18 Thread Heikki Linnakangas
Robert Bernabe wrote: In a nutshell it seems that MS SQL allows bad T-SQL code by optimizing and ignoring redundant/useless from and where clauses in an update statement whereas plpgsql will execute exactly what the code is asking it to do... We had several update instances in the T-SQL code t

Re: [PERFORM] viewing source code

2007-12-18 Thread Roberts, Jon
If we are talking about enhancement requests, I would propose we create a role that can be granted/revoked that enables a user to see dictionary objects like source code. Secondly, users should be able to see their own code they write but not others unless they have been granted this dictionary ro

Re: [PERFORM] viewing source code

2007-12-18 Thread Alvaro Herrera
Roberts, Jon escribió: > Revoking pg_proc isn't good for users that shouldn't see other's code but > still need to be able to see their own code. So create a view on top of pg_proc restricted by current role, and grant select on that to users. -- Alvaro Herreraht

Re: [PERFORM] viewing source code

2007-12-18 Thread Roberts, Jon
So you are saying I need to create a view per user to achieve this? That isn't practical for an enterprise level database. I'm basically suggesting row level security that would be implemented for a system table and then RLS could be used for user defined tables too. Jon > -Original Messag

Re: [PERFORM] viewing source code

2007-12-18 Thread Richard Huxton
Roberts, Jon wrote: So you are saying I need to create a view per user to achieve this? That isn't practical for an enterprise level database. Surely you'd just have: CREATE VIEW ... AS SELECT * FROM pg_proc WHERE author=CURRENT_USER -- Richard Huxton Archonet Ltd --

Re: [PERFORM] viewing source code

2007-12-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 18 Dec 2007 10:05:46 -0600 "Roberts, Jon" <[EMAIL PROTECTED]> wrote: > If we are talking about enhancement requests, I would propose we > create a role that can be granted/revoked that enables a user to see > dictionary objects like source cod

Re: [PERFORM] viewing source code

2007-12-18 Thread Alvaro Herrera
Roberts, Jon escribió: > So you are saying I need to create a view per user to achieve this? That > isn't practical for an enterprise level database. No -- that would be quite impractical indeed. I'm talking about something like revoke all privileges on pg_proc from public; create view limited_

[PERFORM] Optimising a query

2007-12-18 Thread Paul Lambert
I have a query that looks like this: SELECT DISTINCT ON (EEFSCode) eefsbase.company||eefsbase.department||eefsbase.branch||eefsbase.franchise||eefsbase.subledger||eefsbase.account AS EEFSCode, eefsbase.company AS company_code, eefsbase.branch AS bran

Re: [PERFORM] Optimising a query

2007-12-18 Thread Paul Lambert
Paul Lambert wrote: This part of the query alone takes a significant part of the time: SELECT DISTINCT ON (finbalance.dealer_id, finbalance.year_id, finbalance.subledger_id, finbalance.account_id) finbalance.year_id AS year, finbalance.dealer