Re: [PERFORM] Best design for performance

2017-03-28 Thread Riaan Stander
On 28 Mar 2017 4:22 AM, Claudio Freire wrote: From: Claudio Freire [mailto:klaussfre...@gmail.com] How did you query the table's size? You're probably failing to account for TOAST tables. I'd suggest using pg_total_relation_size. ... On Mon, Mar 27, 2017 at 10:17 PM, Riaan Stander <rs

Re: [PERFORM] Best design for performance

2017-03-28 Thread Riaan Stander
On 2017-03-28 07:15 PM, Claudio Freire wrote: On Tue, Mar 28, 2017 at 9:41 AM, Riaan Stander <rstan...@exa.co.za> wrote: CREATE TABLE [dbo].[usrUserRights] ( [UserId] [dbo].[dm_Id] NOT NULL, [SiteId] [dbo].[dm_Id] NOT NULL, [RightId] [dbo].[dm_Id] NO

[PERFORM] Best design for performance

2017-03-27 Thread Riaan Stander
1783) AND (right_id = 1)) (9 rows) Regards Riaan Stander

Re: [PERFORM] Best design for performance

2017-03-27 Thread Riaan Stander
udio Freire [mailto:klaussfre...@gmail.com] Sent: 28 March 2017 02:42 AM To: Riaan Stander <rstan...@exa.co.za> Cc: postgres performance list <pgsql-performance@postgresql.org> Subject: Re: [PERFORM] Best design for performance On Mon, Mar 27, 2017 at 8:43 PM, Riaan Stander <rstan.

Re: [PERFORM] Bulk persistence strategy

2017-05-22 Thread Riaan Stander
On 22 May 2017 at 03:14, Riaan Stander <rstan...@exa.co.za> wrote: Riaan Stander <rstan...@exa.co.za> writes: The intended use is use-once. The reason is that the statements might differ per call, especially when we start doing updates. The ideal would be to just issue the sq

[PERFORM] Bulk persistence strategy

2017-05-21 Thread Riaan Stander
tmp_641f51c9_d188_4386_93f3_c40001b191e7(Text,Text,Text,Text); Is there a better way I'm missing and is "temp" function creation in Postgres a big performance concern, especially if a server is under load? Regards Riaan Stander

Re: [PERFORM] Bulk persistence strategy

2017-05-22 Thread Riaan Stander
On 22 May 2017 at 09:06, Riaan Stander <rstan...@exa.co.za> wrote: It sounds like you don't know about anonymous code blocks with DO https://www.postgresql.org/docs/devel/static/sql-do.html Yes I do know about that feature. My first implemented generated an anonymous code block, but

Re: [PERFORM] Bulk persistence strategy

2017-05-21 Thread Riaan Stander
Riaan Stander <rstan...@exa.co.za> writes: I've come up with generating functions on the go, but I'm concerned about the performance impact of this. I first wanted to use an anonoumys code block, but then I cannot do parameter binding from npgsql. ... Is there a better way I'm m

Re: [PERFORM] Bulk persistence strategy

2017-05-21 Thread Riaan Stander
Riaan Stander <rstan...@exa.co.za> writes: The intended use is use-once. The reason is that the statements might differ per call, especially when we start doing updates. The ideal would be to just issue the sql statements, but I was trying to cut down on network calls. To batch them to