Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I need more fields from that table, I just simplified the query for you to easily understand, so index-only scan won't work in this case Commented Aug 2, 2018 at 13:45
  • Also our current machine that runs the process has 8 gigs of RAM and 2 CPUs, do you think increasing that could make a difference? Commented Aug 2, 2018 at 14:25
  • 2
    @inside: Hard to say. Depends on the complete picture. What you describe sounds like "cold cache". I added some more above. Commented Aug 2, 2018 at 14:37
  • thanks a lot @erwin I'll play around with pre-warm, do you think it's feasible to prewarm the table if it has 40 million records? Commented Aug 2, 2018 at 14:45
  • @inside: Depends, depends. If you have enough cache. You may be able to only fetch relevant parts of the table into cache. Commented Aug 2, 2018 at 14:54