Skip to content

Commit 61fcdcc

Browse files
committed
Added one check before to increase performance
1 parent cf5df8e commit 61fcdcc

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

SuperSQL/SuperSQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function __construct($dsn, $user, $pass)
5353
*/
5454
function SELECT($table, $columns = array(), $where = array(), $join = null, $limit = false)
5555
{
56-
if (!$limit && (isset($join['ORDER']) ||
56+
if (!$limit && $join && (isset($join['ORDER']) ||
5757
isset($join['!ORDER']) ||
5858
isset($join['GROUP']) ||
5959
isset($join['LIMIT']) ||

dist/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,37 @@
77

88
### Sizes
99

10-
* `SuperSQL.php` - 28810 Chars (28.8 MB)
11-
* `SuperSQL_min.php` - 12747 Chars (12.7 MB)
10+
* `SuperSQL.php` - 28819 Chars (28.8 MB)
11+
* `SuperSQL_min.php` - 12751 Chars (12.8 MB)
1212
* `SuperSQL_helper.php` - 11234 Chars (11.2 MB)
1313
* `SuperSQL_helper_min.php` - 5558 Chars (5.6 MB)
14-
* `SuperSQL_complete_min.php` - 18025 Chars (18 MB)
14+
* `SuperSQL_complete_min.php` - 18029 Chars (18 MB)
1515

1616
## Hashes
1717

1818
```
19-
* SuperSQL.php - ef68d9f5a5223d8dc8a1e5c9710fee2a
20-
* SuperSQL_min.php - cb59dc4145f4f928ab0420dbf12cf63a
19+
* SuperSQL.php - 2d1797d1e0185d1f4aecfb9868392a18
20+
* SuperSQL_min.php - 2d840638b4a8d854c0cf2eb1b70982a3
2121
* SuperSQL_helper.php - c28eb974df4b6b59cfd1703b93ba5ad5
2222
* SuperSQL_helper_min.php - 434f45d06501865c04386f32874637bf
23-
* SuperSQL_complete.php - 12d192dc93e6bb86d0bc32caf98f2de1
23+
* SuperSQL_complete.php - 38ca2da715288b837e153b0adac8ecde
2424
```
2525

2626
## Performance
2727

2828
Profiled on PHP v7.1.4, 30 loops
2929

3030

31-
0.023ms Average Time, Sum: 0.6896ms
31+
0.0206ms Average Time, Sum: 0.6191ms
3232

3333
### Specifics
3434

3535
| Name | Avg | Sum |
3636
|-------------------------|--------|--------|
37-
| 1 Row Insert | 0.0013 | 0.038 |
38-
| 100 R Insert W Temp | 0.0173 | 0.5191 |
39-
| Select * | 0.0007 | 0.02 |
40-
| Select * W Cast | 0.0006 | 0.0178 |
41-
| Select * W Cast W where | 0.0007 | 0.0201 |
42-
| 1 Row Update | 0.0014 | 0.0413 |
43-
| Delete | 0.001 | 0.0309 |
37+
| 1 Row Insert | 0.001 | 0.0312 |
38+
| 100 R Insert W Temp | 0.0157 | 0.4703 |
39+
| Select * | 0.0005 | 0.016 |
40+
| Select * W Cast | 0.0005 | 0.0164 |
41+
| Select * W Cast W where | 0.0006 | 0.0176 |
42+
| 1 Row Update | 0.0012 | 0.0371 |
43+
| Delete | 0.0009 | 0.0281 |

dist/SuperSQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ function __construct($dsn, $user, $pass)
793793
}
794794
function SELECT($table, $columns = array(), $where = array(), $join = null, $limit = false)
795795
{
796-
if (!$limit && (isset($join['ORDER']) ||
796+
if (!$limit && $join && (isset($join['ORDER']) ||
797797
isset($join['!ORDER']) ||
798798
isset($join['GROUP']) ||
799799
isset($join['LIMIT']) ||

0 commit comments

Comments
 (0)