Re: [PERFORM] Efficient Correlated Update

2013-08-08 Thread Robert DiFalco
Guys, let me know if I have not provided enough information on this post. Thanks! On Thu, Aug 8, 2013 at 11:06 AM, Robert DiFalco wrote: > In my system a user can have external contacts. When I am bringing in > external contacts I want to correlate any other existing users in the > system with t

Re: [PERFORM] subselect requires offset 0 for good performance.

2013-08-08 Thread Vik Fearing
On 08/02/2013 09:37 AM, Vik Fearing wrote: > EXPLAIN ANALYZE > WITH RECURSIVE > x (start_time) AS > ( > SELECT generate_series(1, 100) > ), > t (time, timeround) AS > ( > SELECT time, time - time % 90 AS timeround > FROM (SELECT min(start_time) AS time FROM x) AS tmp > UNION

Re: [PERFORM] Efficiently query for the most recent record for a given user

2013-08-08 Thread Claudio Freire
On Thu, Aug 8, 2013 at 5:01 PM, Kevin Grittner wrote: > Claudio Freire wrote: >> On Wed, Aug 7, 2013 at 4:04 PM, Tom Lane wrote: Yeah, but it's faster if it's in the same direction, because the kernel read-ahead code detects sequential reads, whereas it doesn't when it goes backwa

[PERFORM] Efficient Correlated Update

2013-08-08 Thread Robert DiFalco
In my system a user can have external contacts. When I am bringing in external contacts I want to correlate any other existing users in the system with those external contacts. A users external contacts may or may not be users in my system. I have a user_id field in "contacts" that is NULL if that

[PERFORM] Re: [PERFORM] RE: [PERFORM] Re: [PERFORM] Sub-optimal plan for a paginated query on a view with another view inside of it.

2013-08-08 Thread slapo
I was afraid of something worse but hoping for something better in terms of maintainability. At least now I have a good explanation. :-) I just hope the embedded view use won't interfere too much.   Thanks everyone.   Regards,   Peter Slapansky   ___