I have a Postgres table with 26 million rows in it, and I want to add an indexed boolean column.
Is there a way to calculate how long that type of operation will take, before attempting it in production?
I followed this guide to pick the parameters: https://www.cybertec-postgresql.com/en/postgresql-parallel-create-index-for-better-performance/. This sped up the index creation and it only took 35 hours. Shaving off 10 hours was a nice surprise. Thanks!
The table is partitioned into 40 pieces on column text . Then creating index on the table takes about 1 hours to complete.
Although it varies, it seems to take as little as 4 days and up to 6 months for a site to be crawled by Google and attribute authority to the domain. When you publish a new blog post, site page, or website in general, there are many factors that determine how quickly it will be indexed by Google.
If you are just adding the single index, it should take about 10 minutes. However, it will take 100 minutes or more if you don't have that index file in memory. Your 200 varchar with 8 million rows will take a maximum of 1.6GB, but with all of the indexing overhead it will take about 2-3 GB.
There is no way to calculate index time as it depends on many factors (hardware, software, configuration, load, etc.)
The good news is that you may CREATE INDEX CONCURRENTLY
, which takes longer but does not lock the table. So the operation has no side effects except higher load on server.
For some caveats, check the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With