cockroachdb / cockroachdb/cockroach
Got "Drop unused index" recommendation on sequence
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
I got an index recommendation "Drop unused index". Reason: This index has not been used and can be removed for better write performance.
But, that is not an index of a table, but a sequence.
CC thinks the index was created like this:
`CREATE INDEX "primary" ON defaultdb.public.nextid USING btree (value ASC)`
But the actual creation statement was:
`CREATE SEQUENCE nextid start with 1001 INCREMENT BY 7;`
**To Reproduce**
A sequence was created as written above.
**Expected behavior**
Not to recommend index deletion on non-existent indicies
**Additional data / screenshots**

**Environment:**
Container in docker swarm
```
# cockroach version
Build Tag: v23.2.1
Build Time: 2024/02/15 22:46:26
Distribution: CCL
Platform: linux amd64 (x86_64-pc-linux-gnu)
Go Version: go1.21.5 X:nocoverageredesign
C Compiler: gcc 6.5.0
Build Commit ID: 898cd6a363fd47bb92a03bac216f9bed0f64bc08
Build Type: release
Enabled Assertions: false
```
**Additional context**
No impact
Jira issue: CRDB-36244
Contributor guide
Assessment
This issue has not been assessed yet.