Jump to content
  • 0

SQL performance ( ? )



i make a gm command;

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

	if (*arg1)
		str_to_number(count, arg1);
		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", "", 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;




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

Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.