abcfy2 opened a new issue, #14424:
URL: https://github.com/apache/grails-core/issues/14424
Here is a sample:
```groovy
class Nft {
String token
String address
static mapping = {
token index: 'idx_nft'
address index: 'idx_nft'
}
}
```
The result index is:
```sh
psql -c '\d+ nft' db
Table "public.nft"
Column | Type | Collation | Nullable |
Default | Storage | Stats target | Description
---------+------------------------+-----------+----------+---------------------------------+----------+--------------+-------------
id | bigint | | not null |
nextval('nft_id_seq'::regclass) | plain | |
version | bigint | | not null |
| plain | |
address | character varying(255) | | not null |
| extended | |
token | character varying(255) | | not null |
| extended | |
Indexes:
"nft_pkey" PRIMARY KEY, btree (id)
"idx_nft" btree (address, token)
Access method: heap
```
The composite index is: ` "idx_nft" btree (address, token)`.
How do I define a composite index in order `(token, address)`?
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]