Jump to content

Search the Community

Showing results for tags 'optimisation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. I've been searching for a MySQL tips and noticed there is no such topics on this forum. So let's fix this little problem. I want to know more about optimising MySQL queries and how to interract with MySQL correctly, I am newbie in that. I learned that putting queries in the loop it's too performance-expensive, wrong, and very big chance it'll freeze your server for uncertain time. So if I want to get information from DB for a many players, better to make it using only 1 query. Example: "SELECT * FROM race_stats WHERE playerID IN(??)" Where "??" = table with logged in players. But, what if I want to update information for a many players at the same time? How such query should look like? For 1 player it looks like this: "UPDATE race_stats SET id1 = id1 + ?, id2 = id2 + ?, id3 = id3 + ?, id4 = id4 + ?, id5 = id5 + ? WHERE playerID = ?" But how to make the same for all players? Put query in the loop will be too performance-expensive I guess and will create laggs. P.S. Maybe for such thing as player stats better to learn MySQL procuderes and create procedure for this, I am newbie, just asking. Don't even know what is procedures exactly, just heard about it.
×
×
  • Create New...