Eloquent Performance on Jetstream Laravel Jetstream browser session already gives me low performance. How can I fix that?
Very simple, don't use uuid or similar as the primary key, you should use an integer as your primary key, because indexing doesn't really work well on random strings.
@Tray2 I did not do anything. It's just a default laravel jetstream browser session.
@Tray2 default jetstream session database.
public function up(): void
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
local or remote database?
@shaungbhone 15ms does seem slow locally but its more likely to be your Db than laravel imo
@Snapey For me "yes". By default 20MB. xd
Please sign in or create an account to participate in this conversation.