9 January, 2025

SQLLite too slow?
By: Matthew Jackson

Perhaps you're like me and saw your massive table slow down alot....

Here is a simple problem:

 

"SELECT * FROM episodes LIMIT {limit} OFFSET {start*limit};"

The problem is quite insidious because it runs in 0.05s when you start, but by the 30 millionth row it might take 10s.... This is because the offset rule in sqllite will actually go through the database throwing out rows, until you get to the offset desired!!

The solution? Don't use offset, instead use ROWID!...

Tags: SQL, sqllite, efficiency

Read More
12 July, 2016

NoSQL vs SQL (short version)
By: Matthew Jackson

They both have their advantages. I will list 4 major advantages of each, there may be more but this is the short version.

SQL

  • Relationships. You can easily have two tables linked together with a shared id column. Getting data is easy and changing data means just changing the data in one spot.
  • Maturity. SQL has been used professionally for quite some time and many bugs have been found and fixed. Security holes have been identified and taught how to be beaten. Many times incorporated into
  • ...

Tags: SQL, NoSQL

Read More
15 January, 2015

Prevent Hackers with PHPixie
By: Matthew Jackson

It is important to know when programming how to prevent hacking. Here is another way where PHPixie works great and as expected.It appears to me that PHPixie protects against alot of stanard hacking if used in the proper and expected way:

 

When getting post data, instead of using the standard PHP: $_POST["variable_name"]; (WRONG)

Use PHPhixie:
$this->pixie->post("variable_name");

 

When adding it into the database do NOT use mysql queries... instead use...

Tags: PHPixie, Security, SQL

Read More
1