[PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-03 Thread Caio Casimiro
kware 14.0 Postgresql Version: *9.3 Beta2* *postgresql.conf Settings:* work_mem = 128MB shared_buffers = 1GB maintenance_work_mem = 1536MB fsync = off synchronous_commit = off effective_cache_size = 2GB *Additional information:* All tables in this database are read only tables. I haven't post the de

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
Thank you very much for your answers guys! On Mon, Nov 4, 2013 at 5:15 PM, Jeff Janes wrote: > On Sun, Nov 3, 2013 at 2:05 PM, Caio Casimiro > wrote: > >> Hello all, >> >> I have one query running at ~ 7 seconds and I would like to know if it's >> pos

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
I should also say that table tweet has more than 400 millions hows and table tweet_topic has estimated more than 800 millions rows. Thanks again, Caio On Mon, Nov 4, 2013 at 6:44 PM, Caio Casimiro wrote: > Thank you very much for your answers guys! > > > On Mon, Nov 4, 2013 at 5

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
013 at 6:52 PM, Igor Neyman wrote: > > > From: pgsql-performance-ow...@postgresql.org [mailto: > pgsql-performance-ow...@postgresql.org] On Behalf Of Caio Casimiro > Sent: Monday, November 04, 2013 3:44 PM > To: Jeff Janes > Cc: pgsql-performance@postgresql.org > Subj

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
WD10EZEX-00RKKA0) This machine runs a slackware 14.0 dedicated to the Postgresql. Thank you, Caio On Mon, Nov 4, 2013 at 7:26 PM, Igor Neyman wrote: > From: Caio Casimiro [mailto:casimiro.lis...@gmail.com] > Sent: Monday, November 04, 2013 4:10 PM > To: Igor Neyman > Cc: Jeff

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
;Index Cond: (tweet_id = t.id)" "Buffers: shared hit=1763 read=632" You said that I would need B-Tree indexes on the fields that I want the planner to use index only scan, and I think I have them already on the tweet table: "tweet_ios_inde

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-04 Thread Caio Casimiro
manner you will > reduce the random i/o of the scanning of 1759645 rows from tweet that are > filter later now in hash join to 1679. > > I hope it will work, if not, I hope you could attach the DDL of the table > ( with constraints and indexes) to better understand the problem. > &

Re: [PERFORM] Slow index scan on B-Tree index over timestamp field

2013-11-06 Thread Caio Casimiro
"Index Cond: ((user_id = relationship.followed_id) AND (creation_time >= '2013-06-22 00:00:00-03'::timestamp with time zone) AND (creation_time <= '2013-06-23 00:00:00-03'::timestamp with time zone))" "Heap Fetches: 0" "Buff