Optimize MySQL order by RAND()

It is not recommended to use ORDER BY RAND() only, it will slow for query large database like over 50,000 rows. The easiest way to optimize existing code, just add
RAND()< (SELECT ((1/COUNT(*))*10) FROM Table_name)
after the WHERE before the ORDER, this sub query will speed up the select random from the table.

Using this way, you no need to worry the database that without ID and Auto INC too.

SELECT * FROM `Table_name` WHERE
RAND()<(SELECT ((1/COUNT(*))*10) FROM Table_name WHERE `field` = 'value' )
ORDER BY RAND() LIMIT 1;

ERROR: IITC failed to extract the required parameters from the intel site

I’ve got the error by using IITC for Ingress today

IITC failed to extract the required parameters from the intel site
This can happen after Niantic update the standard intel site. A fix will be needed from the IITC developers.

-  var reVersion = new RegExp('[a-z]=[a-z].getData\\(\\);[a-z].v="([a-f0-9]{40})";');
+  var reVersion = new RegExp('[a-z].v="([a-f0-9]{40})";');
 
-  var minified = new RegExp('^[a-zA-Z$][a-zA-Z$0-9]$');
+  var minified = new RegExp('^[a-zA-Z$0-9]{1,2}$');

Reference: https://github.com/dwinss/ingress-intel-total-conversion/commit/26c7616d0f8e070451e455e70003c47f1bb279a2

  1. Click the Tampermonkey Button at the Top Right of your Google Browser
  2. Click on Dashboard
  3. Click on IITC: Ingress Intel Map Total Conver….
  4. Jump to the link 12622
  5. Modify like this
window.extractFromStock = function() {
  window.niantic_params = {}

//   extract the former nemesis.dashboard.config.CURRENT_VERSION from the code
//   var reVersion = new RegExp('[a-z]=[a-z].getData\\(\\);[a-z].v="([a-f0-9]{40})";');
     var reVersion = new RegExp('[a-z].v="([a-f0-9]{40})";');

//   var minified = new RegExp('^[a-zA-Z$][a-zA-Z$0-9]$');
     var minified = new RegExp('^[a-zA-Z$0-9]{1,2}$');

Then refresh your browser.