mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Attempt to fix index performance issues.
This commit is contained in:
parent
d9ab303a9d
commit
6012c1cd82
2 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,7 @@ import javax.persistence.Index;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity
|
@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 {
|
public class PubSub {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
|
|
@ -37,7 +37,9 @@ public class User implements Serializable {
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
|
|
||||||
@ElementCollection
|
@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)
|
@Column(name = "channel", length = 30)
|
||||||
private List<String> subscribed_ids;
|
private List<String> subscribed_ids;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue