core icon indicating copy to clipboard operation
core copied to clipboard

Database (MySQL): longtext-coumns

Open fgusinde opened this issue 12 years ago • 3 comments

I found seven columns with type longtext in MySQL Database:

+--------------------+--------------+-------------+ | TABLE_NAME | COLUMN_NAME | COLUMN_TYPE | +--------------------+--------------+-------------+ | oc_appconfig | configvalue | longtext | | oc_clndr_calendars | timezone | longtext | | oc_clndr_objects | calendardata | longtext | | oc_contacts_cards | carddata | longtext | | oc_documents_op | opspec | longtext | | oc_locks | uri | longtext | | oc_preferences | configvalue | longtext | +--------------------+--------------+-------------+

Since longtext is with a maximum length of 4,294,967,295 or 4GB (232 – 1) characters I cannot understand that there's needed e.g. a configvalue with size of 4 gigabytes. Maybe it's possible to create a limit, e.g. 4000 and use a varchar instead?

fgusinde avatar Jul 29 '14 12:07 fgusinde

well - 4GB will most likly never be exceeded - but 4000 chars can be critical for e.g. calendar and contacts data. contacts data can e.g. contain profile pictures

DeepDiver1975 avatar Jul 29 '14 13:07 DeepDiver1975

In addition - please note that we are NOT designing ownCloud to run optimal on MySql (or any other database) but we try to support a great majority of databases (sqlite, MySql/MariaDB, PG, Oracle and MSSQL) as good as possible.

We have to make trade-offs.

DeepDiver1975 avatar Jul 29 '14 13:07 DeepDiver1975

I'm closing this as I see no really action to be taken here and in addition any change in the database schema will potentially cause migration issues. THX

DeepDiver1975 avatar Jul 29 '14 13:07 DeepDiver1975