Jump to content

SQL performance ( ? )


Recommended Posts

i make a gm command;

ACMD(do_sqltestlog)
{
	char	arg1[256];
	uint64_t count = 0;
	one_argument(argument, arg1, sizeof(arg1));

	if (*arg1)
	{
		str_to_number(count, arg1);
	}
	else
	{
		count = 1;
	}

	count = MIN(100000000, count);

	for (uint64_t i = 0; i < count; ++i)
	{
		DBManager::instance().Query("INSERT INTO log.log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), '%u', '%u', '%u', '%u', '%s', '%s', '%s', '%u')", 1, 555, 666, 10000000, "GM", "FORSQLTEST", "192.168.1.1", 00);
	}

	ch->ChatPacket(CHAT_TYPE_INFO, "%u adet sorgu gonderimi tamamlandi", count);
}

 

i did 10 million row insert in log.log and its take 660 second.  i give my local server 12 cpu cores ( i7 8700k ) and 6 gb ram. i using mariadb;

 

spacer.png

 

I can insert log table ~11.500 row per second but i have question, this performance is good or bad?

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.