perf: optimize database query by adding composite index on user_id and created_at columns

This commit is contained in:
2025-12-03 14:01:02 +00:00
parent 43103e7120
commit 29c8b6d063
11 changed files with 322 additions and 121 deletions
+13
View File
@@ -112,6 +112,19 @@ void rava_program_add_class(RavaProgram_t *program, RavaClass_t *class) {
program->classes[program->class_count++] = class;
}
void rava_program_prebuild_label_tables(RavaProgram_t *program) {
if (!program) return;
for (size_t i = 0; i < program->class_count; i++) {
RavaClass_t *class = program->classes[i];
for (size_t j = 0; j < class->method_count; j++) {
RavaMethod_t *method = class->methods[j];
if (!method->label_table && method->instructions) {
method->label_table = rava_labeltable_create(method->instructions);
}
}
}
}
static const char* _rava_opcode_name(RavaOpCode_e opcode) {
switch (opcode) {
case RAVA_OP_NOP: return "NOP";