1
0
Mirror von https://github.com/nextcloud/server.git synchronisiert 2024-08-22 05:55:27 +02:00
Commit graph

50 Commits

Autor SHA1 Nachricht Datum
Johannes Merkel
06d076410a
feat(occ): add possibility to edit indices
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
2024-02-27 11:03:08 +01:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Joas Schilling
ab70bbd3ff
fix(db)!: Remove private legacy event because we can not keep it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:35 +02:00
Joas Schilling
86310a35b2
fix(db): Move missing core indices to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:34 +02:00
Joas Schilling
00d483585b
fix: Add options to support all used features by core
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-24 14:51:34 +02:00
Julius Härtl
2601db240f
Merge pull request #39389 from nextcloud/enh/add-missing-indices-event 2023-07-14 14:21:39 +02:00
Julius Härtl
925bcebcb6
feat: Add public event for missing indices
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-07-14 13:11:22 +02:00
Arthur Schiwon
e5160e0c1c
fix(db): no hardcoded table prefix is expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-07-13 23:34:39 +02:00
Marcel Klehr
fcf1c3033b fix(systemtags): Add missing systemtags index
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-06-21 15:20:30 +02:00
Faraz Samapoor
b5cbba7fc1 Uses PHP8's constructor property promotion in core/Command/Db classes.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-06-19 12:55:15 +02:00
Robin Appelman
db43d90387
add new index in repair step instead of on-migrate
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-28 15:08:08 +02:00
Louis Chemineau
bda66f9fb6 Add parent index on filecache
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-03-20 15:02:23 +00:00
Marcel Klehr
047cc708d4 DB mounts table: Add index for mount_provider_class
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2022-08-01 14:27:34 +02:00
Carl Schwan
b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 22:18:06 +02:00
Julius Härtl
7fbd93b2ad
Additional index on oc_preferences to make sure that gettingh values without a user filter is fast
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-19 12:37:36 +02:00
Louis Chemineau
970fb7ce65 Don't create cards_abiduri it if already exists
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-03-24 10:42:22 +00:00
Louis Chemineau
405c5eb813 Add --dry-run option for db:add-missing-* cmd
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-24 16:42:08 +01:00
Julius Härtl
415294e345
Add index for direct editing cleanup job
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-07 09:25:27 +01:00
Christoph Wurst
ed84f07784
Add missing index for propertypath only queries against properties
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-23 15:51:50 +01:00
Joas Schilling
536a812de4
Add an index for selecting the next job
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 23:57:40 +01:00
Robin Appelman
695326534c
disable path prefix index on postgresql for now
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement.
to prevent making it harder to add the correct index later on we don't create the index for now on postgresql

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:39:22 +02:00
Robin Appelman
abd6b354ac
add a prefix index to filecache.path
The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
allowing us to add an index even if the column is to long.

Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.

Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:38:25 +02:00
Robin Appelman
6502dfae34
add better index for finding unindexed paths
for the following query 'SELECT "path" FROM "oc_filecache" WHERE ("storage" = $storage) AND ("size" < 0) ORDER BY "fileid" DESC LIMIT 1;'

currently the database will in some cases decide to priorize the sort by fileid over the filter when picking what index to use, resulting in a much slower query.

by creating an index that allows first sorting by fileid and also filter by storage and size this case will be greatly sped up

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-07 16:11:49 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Roeland Jago Douma
14ee17e5c5
Revert "add a prefix index to filecache.path" 2021-04-08 10:09:13 +02:00
Robin Appelman
b28f0a0e94
add a prefix index to filecache.path
The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
allowing us to add an index even if the column is to long.

Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.

Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 18:52:25 +01:00
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Julius Härtl
c77e259cfe
Add missing index on oc_cards and rename if it previously existed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:34 +01:00
Robin Appelman
634c051be6
add size index for filecache
improves performance of #23004

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-22 15:15:34 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Joas Schilling
ab21d69903
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 14:54:51 +02:00
Mario Danic
6e28c2807b
Add index to properties table
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2020-04-30 23:04:15 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Joas Schilling
bc6a5ef5c4
Merge pull request #19890 from nextcloud/enh/comments-reference-id
Add optional comments reference_id
2020-04-02 11:34:21 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Joas Schilling
720dc4e93d
Add optional column oc_comments.reference_id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:15 +02:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Thomas Citharel
68cf47e947
Check and add index on principaluri for schedulingobjects table
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-10-08 10:25:56 +02:00
Thomas Citharel
90e5850cc4
Add index on calendarid for calendarobject_props table
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-10-07 22:03:15 +02:00
Joas Schilling
592093079f
Deduplicate index names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-27 13:32:59 +01:00
Joas Schilling
274658629d
Make sure all tables have named indexes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-27 13:32:59 +01:00
Roeland Jago Douma
16cc68a2fe
Add twofactor_providers_uid index
Fixes #12943

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-21 13:03:02 +01:00
Morris Jobke
4d20c4272f
Fix index names
* see #11527
2018-11-06 15:21:16 +01:00
Roeland Jago Douma
b82cbe04df
Add uid_owner and uid_initiator share tabe indices
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-01 23:59:36 +02:00
Robin Appelman
91d3e48ab3
Add filecache index on mtime
Gives searching by mtime and "recent" a proper index to use

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-07-19 17:43:20 +02:00
Roeland Jago Douma
2f59f389d2
Add parent index to share table
Fixes #9327

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-03 13:36:02 +02:00
Roeland Jago Douma
80cc8d0028
Emit event when running ./occ db:add-missing-indices
This allows apps to listen to this event in order to also update
indecies there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-24 18:03:10 +02:00
Bjoern Schiessle
41ee23a054
make occ command more generic
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-12-18 21:14:45 +01:00