mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Add database indices to improve performance
This commit is contained in:
parent
9d069149d7
commit
ed91ffc60a
17 changed files with 193 additions and 18 deletions
|
@ -59,7 +59,10 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
*
|
||||
* @UniqueEntity("iso_code")
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table(name="currencies")
|
||||
* @ORM\Table(name="currencies", indexes={
|
||||
* @ORM\Index(name="name_idx", columns={"name"}),
|
||||
* @ORM\Index(name="parent_name_idx", columns={"parent_id", "name"}),
|
||||
* })
|
||||
*/
|
||||
class Currency extends AbstractStructuralDBElement
|
||||
{
|
||||
|
|
|
@ -66,7 +66,9 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
/**
|
||||
* Class Orderdetail.
|
||||
*
|
||||
* @ORM\Table("`orderdetails`")
|
||||
* @ORM\Table("`orderdetails`", indexes={
|
||||
* @ORM\Index(name="orderdetails_supplier_part_nr", columns={"supplierpartnr"}),
|
||||
* })
|
||||
* @ORM\Entity()
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
* @UniqueEntity({"supplierpartnr", "supplier", "part"})
|
||||
|
|
|
@ -66,7 +66,10 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
* Class Pricedetail.
|
||||
*
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table("`pricedetails`")
|
||||
* @ORM\Table("`pricedetails`", indexes={
|
||||
* @ORM\Index(name="pricedetails_idx_min_discount", columns={"min_discount_quantity"}),
|
||||
* @ORM\Index(name="pricedetails_idx_min_discount_price_qty", columns={"min_discount_quantity", "price_related_quantity"}),
|
||||
* })
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
* @UniqueEntity(fields={"min_discount_quantity", "orderdetail"})
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue