Skip to content

Conversation

@abnegate
Copy link
Member

Allow setting different isolation modes by using different setters

Schema per project:

$database
    ->setDatabase($projectId)
    ->create();

Single schema, unique tables (current arch):

$database
    ->setDatabase('appwrite')
    ->setNamespace($projectId)
    ->create();

Single schema, shared tables:

$database
    ->setDatabase('appwrite')
    ->setShareTables(true)
    ->setTenant($projectId)
    ->create();

@abnegate abnegate marked this pull request as ready for review November 22, 2023 08:25
@christyjacob4
Copy link
Contributor

christyjacob4 commented Nov 28, 2023

Let's setup a test bench to simulate the kind of loads we receive on cloud.

I am mainly concerned about indexes and how they perform before and after this change.

@fanatic75 fanatic75 self-requested a review November 28, 2023 21:19
@abnegate
Copy link
Member Author

abnegate commented Dec 8, 2023

@christyjacob4 @fogelito For 500K documents, the columns are indexed, and then an equal query is run.

Architecture Insert Time (s) Inserts per Second Query Time (s)
MariaDB 1233.96 405.20 0.0395
MariaDB - Shared 1246.01 401.28 0.0402
MySQL 1479.15 338.03 0.0436
MySQL - Shared 1655.24 302.07 0.0363

And the same for a fulltext index

Architecture Insert Time (s) Inserts per Second Query Time (s)
MariaDB 1233.96 405.20 38.31
MariaDB - Shared 1246.01 401.28 33.50
MySQL 1479.15 338.03 15.29
MySQL - Shared 1655.24 302.07 14.09

@abnegate abnegate merged commit 035e6b4 into main Dec 8, 2023
@abnegate abnegate deleted the feat-isolation-mode branch December 8, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants