Intel Comet Lake-S Alleged Pricing

ModelPart NumberBase Clock (GHz)Pricing
Core i9-10900KCM80701042828443.7$562
Core i9-10900KFCM80701042828463.7$532
Core i9-10900CM80701042826242.8$506
Core i9-10900TCM80701042826241.9$506
Core i9-10900FCM80701042826252.8$476
Core i7-10700KCM80701042824363.8$436
Core i7-10700KFCM80701042824373.8$405
Core i7-10700CM80701042823272.9$376
Core i7-10700TCM80701042822152.0$376
Core i7-10700FCM80701042823292.9$346
Core i5-10600KCM80701042821344.1$296
Core i5-10600KFCM80701042821364.1$266
Core i5-10600CM80701042903123.3$250
Core i5-10600TCM80701042904102.4$250
Core i5-10500CM80701042905113.1$226
Core i5-10500TCM80701042906062.3$226
Core i5-10400CM80701042907152.9$215
Core i5-10400TCM80701042908062.0$215
Core i5-10400FCM80701042907162.9$185
Core i3-10320CM80701042910093.8$184
Core i3-10300CM80701042911093.7$171
Core i3-10300TCM80701042912123.0$171
Core i3-10100CM80701042913173.6$147
Core i3-10100TCM80701042914123.0$147
Pentium G6600CM80701042915104.2$105
Pentium G6500CM80701042916104.1$93
Pentium G6500TCM80701042917073.5$93
Pentium G6400CM80701042918104.0$81
Pentium G6400TCM80701042919073.4$81
Celeron G5920CM80701042920103.5$68
Celeron G5900CM80701042921103.4$56
Celeron G5900TCM80701042922073.2$56

MIGRATING PHP CODE FROM MYSQL TO SQLITE, THE BASICS

Data types

MySQL

There’s a shitload of data types, really, just go look at the official documentation and bask in the glory of MySQL redundancy (j/k).

SQLite

Very few, reassuring and simple data types. Basically text, numbers, and “whatever” (blob). Again, go look at the official documentation.

Database connection

MySQL

$GLOBALS["dbcon"]=@mysqli_connect($dbhost, $dbuser, $dbpass);
if (mysqli_error($GLOBALS["dbcon"])) die("errore connessione db");
@mysqli_select_db($GLOBALS["dbcon"],$dbname);
if (mysqli_error($GLOBALS["dbcon"])) die("errore connessione db");
@mysqli_set_charset($GLOBALS["dbcon"],'utf8');
if (mysqli_error($GLOBALS["dbcon"])) die("errore connessione db");

SQLite

$db = new SQLite3(dirname(__FILE__)."/DB/db.sqlite");
$db->busyTimeout(5000);
// WAL mode has better control over concurrency.
// Source: https://www.sqlite.org/wal.html
$db->exec('PRAGMA journal_mode = wal;');
$db->exec('PRAGMA synchronous=NORMAL;');

(last couple of rows are only useful if you plan to have some -little- write-concurrency, otherwise don’t use them)

Very important thing to know: if you are writing code for a local-running application, SQLite connections will not “time out” as there’s no server to wait for your input, just a file on the disk (or memory, even!)

Queries

MySQL

$results=mysqli_query($GLOBALS["dbcon"],$query);

SQLite

$db->exec($query);

when you don’t expect results, so for INSERTUPDATE or DELETE

$results=$db->query($query);

when you expect multiple results, or several fields in a row

$value=$db->singleQuery($query);

when you want returned a single-value result, for example when the query is something like SELECT timestamp FROM records WHERE id=$number LIMIT 1 (for this, with MySQL, you should parse the results with mysqli_fetch_array or similar, and then select the first value with [0])

Fetch results

MySQL

$row=mysqli_fetch_array($results);

when you want both associative and indexed arrays,

$row=mysqli_fetch_assoc($results);

when you only need associative arrays, and

$row=mysqli_fetch_row($results);

if you want only indexed arrays.

SQLite

In parallel with above:

$row=$results->fetchArray();

$row=$results->fetchArray(SQLITE3_ASSOC);

$row=$results->fetchArray(SQLITE3_NUM);

Speed considerations

If you don’t need associative arrays, you should always go for indexed arrays, since both in MySQL and SQLite they are fetched significantly faster; also, even if by very little, fetching only associative arrays is still faster then having both associative and indexed fetched together (and you’re not going to need those both anyway).

Escaping

MySQL

mysqli_real_escape_string($GLOBALS["dbcon"],$string);

SQLite

SQLite3::escapeString($string);

this function is not binary safe though at the time of writing (hasn’t been for a while from what I understand…)

Database functions

Just converting the PHP functions won’t be sufficient for most.

Think about time functions for examples, or DEFAULT values, or NULLing a NOT NULL timestamp column to have it automatically assigned to CURRENT_TIMESTAMP, these things are not present in SQLite.

MySQL

DEFAULT CURRENT_TIMESTAMP

NOW()YEAR()TIMEDIFF(), and another shitload of functions.

SQLite

DEFAULT (Datetime('now','localtime'))

Several variations on the strftime() functions, of which the Datetime() above is an example.

Again, go look at the official documentation, as what you see above is my own translation for my own purposes, and you will find both in official sources and in the vast world of StackOverflow a plethora of readings and interpretations.