Expand my Community achievements bar.

SOLVED

How to control DB table statistics gathering ?

Avatar

Level 2

Hello All,

 

We are experience issues when WKFXXXXX tables are joined with others. The reason is that optimizer has inaccurate statistics using default settings and chooses wrong join order. In we calculate statistics manually (kill DB process), recalculate statistics using database tools and rerun - everything is fine and much faster. 

Of course best will be to change settings from default on task level - but if we get improvements in overall performance then site wide settings will be helpful

 

Thanks in advance

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

You can control join order by breaking up joins and doing them one at a time with enrichments.

I've done this in Postgres to reduce query time from 30+ seconds to sub-second.

 

Thanks,

-Jon

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

 

You can control join order by breaking up joins and doing them one at a time with enrichments.

I've done this in Postgres to reduce query time from 30+ seconds to sub-second.

 

Thanks,

-Jon