Closed albireox closed 4 years ago
I personally never use cluster, as it is too slow. I always use create table as select * from tab order by q3c_ang2ipix(ra,dec)
instead. It is faster .
And then one can always substitute the original table.
Regarding pg_repack, I'd think it should work fine, as q3c index is just a regular functional index..
That's very useful, will try it. Thanks!
One additional question. After you've created the the new table sorted by ipix, do you then add an index to that table on q3c_ang2ipix or with the sorting that's not needed?
You still need to create an index on q3c_ang2ipix() after sorting.
I'm dealing with some huge tables for which clustering after creating the q3c index can take several days, during which the tables are locked (I cannot even create indexes for other tables). A non-locking alternative seems to be pg_repack. Do you have experience with it and know if it will work with q3c indixes?