Re: Slow join

2018-06-27 Thread Roman Kushnir
Hi Laurenz, You’re right about the table being bloated, the videos.description column is large. I thought about moving it to a separate table, but having an index only on the columns used in the query seems to have compensated for that already. Thank you. > On Jun 27, 2018, at 10:19 AM, Laurenz

Re: Slow join

2018-06-27 Thread Laurenz Albe
Roman Kushnir wrote: > The following basic inner join is taking too much time for me. (I’m using > count(videos.id) > instead of count(*) because my actual query looks different, but I simplified > it here to the essence). > I’ve tried following random people's suggestions and adjusting the > ra

Re: Slow join

2018-06-25 Thread Roman Kushnir
Hi Justin, Thank you for your comments. As you mentioned the size of shared buffers, my first thought was to just switch to a larger machine as this one only has 2 gigs of RAM. But then it occurred to me that the whole videos table is getting loaded into memory while only 2 small columns are a

Re: Slow join

2018-06-25 Thread Justin Pryzby
Hi, Thanks for providing all this info :) On Mon, Jun 25, 2018 at 05:55:49PM +0200, Roman Kushnir wrote: > Hello, > > The following basic inner join is taking too much time for me. (I’m using > count(videos.id ) instead of count(*) because my actual > query looks different,

Slow join

2018-06-25 Thread Roman Kushnir
Hello, The following basic inner join is taking too much time for me. (I’m using count(videos.id ) instead of count(*) because my actual query looks different, but I simplified it here to the essence). I’ve tried following random people's suggestions and adjusting the random_