mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 00:51:59 +01:00
improved index for attachment table
Change-Id: Ib333bbcba35a27eccdba10b18dd1a32a775f82d0 Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
d04776fb5f
commit
3b60f279ea
@ -90,8 +90,7 @@ create table if not exists `attachment` (
|
||||
) Engine=InnoDB;
|
||||
|
||||
create index `attachment_idx` on `attachment`(`piler_id`);
|
||||
create index `attachment_idx2` on `attachment`(`sig`);
|
||||
create index `attachment_idx3` on `attachment`(`ptr`);
|
||||
create index `attachment_idx2` on `attachment`(`sig`, `size`, `ptr`);
|
||||
|
||||
drop view if exists `v_attachment`;
|
||||
create view `v_attachment` AS select `id` as `i`, `piler_id`, `attachment_id`, `ptr`, (select count(*) from `attachment` where `ptr`=`i`) as `refcount` from `attachment`;
|
||||
|
Loading…
Reference in New Issue
Block a user