<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mboeringa/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mboeringa">@mboeringa</a> No. ANALYZE collects statistics. Whether there is an index or not isn't relevant for that. The planner uses those stats and the information about indexes when planning, not somehow when ANALYZE is run.</p>
<p dir="auto">I am running ANALYZE before the CREATE INDEX on the off chance that the index building can somehow be done in a better way with better statistics, although I don't believe that that's the case.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1675#issuecomment-1134279725">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353U7VDSHFBCSD735L73VLMWUVANCNFSM5WTPPK3Q">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353QV4BFFZHE5LHF6HCTVLMWUVA5CNFSM5WTPPK32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOION3YLI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/pull/1675/c1134279725</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1675#issuecomment-1134279725",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1675#issuecomment-1134279725",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>