I have a table index in my postgres 9.6 db that I think would be more efficient if the table was sorted descending rather than ascending (as it currently is). The data that I want to test is not in full production use, but could potentially be accessed by users at any time, and I'd rather not take it down if I can avoid it. Two questions:
- Is it possible to switch the index from ascending to descending on-the-fly?
- If not, I guess I need to drop the index and re-create it. Obviously this will slow down search queries while there is no index. Is that the worst that will happen? Nothing will stop working entirely, right? As I understand it, it will get an exclusive lock on the table before dropping the index, right?
Apologies for the n00b question, I'm quite new to databases. Please be gentle with me!
concurrently
, no table locks). And them remove the first one.