optimize db

This commit is contained in:
pringgosutono
2026-03-12 10:09:39 +07:00
parent fa57409573
commit d77239dbe5
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
require("dotenv").config({ path: require("path").resolve(__dirname, "../.env") });
const mysql = require("mysql");
const mysql = require("mysql2");
const pool = mysql.createPool({
// connectionLimit: process.env.CONNECTIONLIMIT,
host: process.env.DBHOST,

View File

@ -96,7 +96,7 @@ async function job() {
KEY t_gps_tracks_latitude_IDX (latitude,longitude,vhc_id,crt_d,action) USING BTREE,
KEY t_gps_tracks_crt_s_IDX (crt_s,action) USING BTREE,
KEY t_gps_tracks_stts_reverse_geo_IDX (stts_reverse_geo,action,id,latitude,longitude) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4;
`
const createParams = [] // No parameters for this CREATE statement
await db.query(createQuery, createParams)