Raised This Month: $12 Target: $400
 3% 

[Question] SQL_ThreadQuery vs SQL_PrepareQuery


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
luxor
Member
Join Date: Jan 2014
Old 08-24-2016 , 09:09   [Question] SQL_ThreadQuery vs SQL_PrepareQuery
Reply With Quote #1

Title says it all, when should i use SQL_PrepareQuery and when should i use SQL_ThreadQuery.

SQL_PrepareQuery
- faster
- not good for slow connectons
- doesn't need a handler

SQL_ThreadQuery
- slower
- good for slow connections
- is needing a handler

i usually use preparequery when i make the table, and in rest i use threadquery because of his handle feature, but i want to know how do you guys use them.
luxor is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 08-24-2016 , 09:35   Re: [Question] SQL_ThreadQuery vs SQL_PrepareQuery
Reply With Quote #2

The "slower" attribute of SQL_ThreadQuery is very trivial. You must decide for each specific case.

For example, if you send only one query every round to a local server you may prefer SQL_PrepareQuery. But if you do to a remote server with 500ping delay, you must use SQL_ThreadQuery to avoid server freezing. If you are sending ~10 querys/min for each player you may want to use SQL_ThreadQuery to avoid server-blocking...
__________________

Last edited by Neeeeeeeeeel.-; 08-24-2016 at 09:36.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 08-25-2016 , 18:02   Re: [Question] SQL_ThreadQuery vs SQL_PrepareQuery
Reply With Quote #3

Isn't the difference that SQL_ThreadQuery is basically asynchronous?

Last edited by SpeeDeeR; 08-25-2016 at 18:02.
SpeeDeeR is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode