feat: add user_id index to profiles table for faster lookups

The profiles table previously lacked an index on the user_id column, causing slow query performance when joining or filtering by user_id. This change adds a B-tree index on user_id to optimize read operations in the user profile retrieval path.
This commit is contained in:
2025-12-04 23:28:01 +00:00
parent 3247d6c40b
commit c880ff6b3f
13 changed files with 923 additions and 7 deletions
+23 -1
View File
@@ -144,7 +144,23 @@ typedef enum {
RAVA_OP_HASHMAP_REMOVE,
RAVA_OP_HASHMAP_SIZE,
RAVA_OP_HASHMAP_CONTAINSKEY,
RAVA_OP_HASHMAP_CLEAR
RAVA_OP_HASHMAP_CLEAR,
RAVA_OP_SOCKET_NEW,
RAVA_OP_SOCKET_CONNECT,
RAVA_OP_SOCKET_READ,
RAVA_OP_SOCKET_WRITE,
RAVA_OP_SOCKET_CLOSE,
RAVA_OP_SERVER_SOCKET_NEW,
RAVA_OP_SERVER_SOCKET_ACCEPT,
RAVA_OP_SOCKET_GET_INPUT_STREAM,
RAVA_OP_SOCKET_GET_OUTPUT_STREAM,
RAVA_OP_INPUT_STREAM_READ,
RAVA_OP_OUTPUT_STREAM_WRITE,
RAVA_OP_STREAM_CLOSE,
RAVA_OP_METHOD_REF,
RAVA_OP_METHOD_REF_INVOKE
} RavaOpCode_e;
typedef union {
@@ -190,6 +206,12 @@ typedef union {
int end_label;
int exception_local;
} try_handler;
struct {
char *class_name;
char *method_name;
bool is_constructor;
bool is_static;
} method_ref;
} RavaOperand_u;
typedef struct {