mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-05 21:11:05 +02:00
Attempt to fix index performance issues.
This commit is contained in:
parent
d9ab303a9d
commit
6012c1cd82
@ -7,7 +7,7 @@ import javax.persistence.Index;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "pubsub", indexes = { @Index(columnList = "id", name = "id_idx") })
|
||||
@Table(name = "pubsub", indexes = { @Index(columnList = "id", name = "pubsub_id_idx") })
|
||||
public class PubSub {
|
||||
|
||||
@Id
|
||||
|
@ -37,7 +37,9 @@ public class User implements Serializable {
|
||||
private String sessionId;
|
||||
|
||||
@ElementCollection
|
||||
@CollectionTable(name = "users_subscribed", joinColumns = @JoinColumn(name = "subscriber"), indexes = @Index(columnList = "subscriber", name = "subscriber_idx"))
|
||||
@CollectionTable(name = "users_subscribed", joinColumns = @JoinColumn(name = "subscriber"), indexes = {
|
||||
@Index(columnList = "subscriber", name = "users_subscribed_subscriber_idx"),
|
||||
@Index(columnList = "channel", name = "users_subscribed_channel_idx") })
|
||||
@Column(name = "channel", length = 30)
|
||||
private List<String> subscribed_ids;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user