Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:01 AM
John Kraal
 
Posts: n/a
Default Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Dear you,

I've been working on encrypting some data for a customer. They want
their personal/sensitive information encrypted in the database, but they
want to be able to search it too, through the application. So we've been
thinking a bit, and just started trying and benchmarking some solutions
we thought up.

The next one really got my attention, I created a table with 4 fields:

1. id (primary/auto_increment, not really interesting)
2. "field", with encrypted data
3. md5sum (it has no special use, we benched it though.)
4. "line", always containing three words (the same three as encrypted)

When we started querying the table for random words (from lipsum.com),
it seems that searching in the encrypted fields was _lots_ faster.
Results below:

1.000 queries per field:

~$ php -q searchtest.php
Control test (plain/text LIKE %..%): 1.409699s
Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
done

1.000.000 queries per field:

~$ php -q searchtest.php
Control test (plain/text LIKE %..%): 155.059671s
Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
done

Actually, the only thing I could think of to say was: "Well, at least
it's consistent".

I've attached all the files I used for this test. Edit db.inc.php (add
some more lipsum if you want), execute fill.php, and then have fun with
bench.php.

Does any of you know why this is, how come, etc? I'm just very curious.

Regards,

John Kraal

--
/ Humanique
/ Webstrategie en ontwikkeling
/ http://www.humanique.com/

-
Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
Bekijk de vacature op http://www.humanique.com/
-



-- MySQL dump 10.10
--
-- Host: localhost Database: hmnq_test
-- ------------------------------------------------------
-- Server version 5.0.30-Debian_3-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `encryptie`
--

DROP TABLE IF EXISTS `encryptie`;
CREATE TABLE `encryptie` (
`id` int(11) NOT NULL auto_increment,
`field` blob NOT NULL,
`md5sum` varchar(32) NOT NULL,
`line` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `md5sum` (`md5sum`),
KEY `line` (`line`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `encryptie`
--

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2007-10-23 12:17:47


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:01 AM
Jerry Schwartz
 
Posts: n/a
Default RE: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Have you tried reversing the order of your tests, to see if there is some
influence from caching?

Regards,

Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com

> -----Original Message-----
> From: John Kraal [mailto:john@humanique.com]
> Sent: Tuesday, October 23, 2007 8:51 AM
> To: mysql@lists.mysql.com
> Subject: Query performance plain/text versus AES_DECRYPT(): LIKE %..%
>
> Dear you,
>
> I've been working on encrypting some data for a customer. They want
> their personal/sensitive information encrypted in the database, but
> they
> want to be able to search it too, through the application. So we've
> been
> thinking a bit, and just started trying and benchmarking some solutions
> we thought up.
>
> The next one really got my attention, I created a table with 4 fields:
>
> 1. id (primary/auto_increment, not really interesting)
> 2. "field", with encrypted data
> 3. md5sum (it has no special use, we benched it though.)
> 4. "line", always containing three words (the same three as encrypted)
>
> When we started querying the table for random words (from lipsum.com),
> it seems that searching in the encrypted fields was _lots_ faster.
> Results below:
>
> 1.000 queries per field:
>
> ~$ php -q searchtest.php
> Control test (plain/text LIKE %..%): 1.409699s
> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
> done
>
> 1.000.000 queries per field:
>
> ~$ php -q searchtest.php
> Control test (plain/text LIKE %..%): 155.059671s
> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
> done
>
> Actually, the only thing I could think of to say was: "Well, at least
> it's consistent".
>
> I've attached all the files I used for this test. Edit db.inc.php (add
> some more lipsum if you want), execute fill.php, and then have fun with
> bench.php.
>
> Does any of you know why this is, how come, etc? I'm just very curious.
>
> Regards,
>
> John Kraal
>
> --
> / Humanique
> / Webstrategie en ontwikkeling
> / http://www.humanique.com/
>
> -
> Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
> Bekijk de vacature op http://www.humanique.com/
> -
>





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 07:01 AM
John Kraal
 
Posts: n/a
Default Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Yes, I did, and shutdowns between the tests and between reversing the tests.

--
/ Humanique
/ Webstrategie en ontwikkeling
/ http://www.humanique.com/

-
Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
Bekijk de vacature op http://www.humanique.com/
-


Jerry Schwartz wrote:
> Have you tried reversing the order of your tests, to see if there is some
> influence from caching?
>
> Regards,
>
> Jerry Schwartz
> The Infoshop by Global Information Incorporated
> 195 Farmington Ave.
> Farmington, CT 06032
>
> 860.674.8796 / FAX: 860.674.8341
>
> www.the-infoshop.com
> www.giiexpress.com
> www.etudes-marche.com
>
>> -----Original Message-----
>> From: John Kraal [mailto:john@humanique.com]
>> Sent: Tuesday, October 23, 2007 8:51 AM
>> To: mysql@lists.mysql.com
>> Subject: Query performance plain/text versus AES_DECRYPT(): LIKE %..%
>>
>> Dear you,
>>
>> I've been working on encrypting some data for a customer. They want
>> their personal/sensitive information encrypted in the database, but
>> they
>> want to be able to search it too, through the application. So we've
>> been
>> thinking a bit, and just started trying and benchmarking some solutions
>> we thought up.
>>
>> The next one really got my attention, I created a table with 4 fields:
>>
>> 1. id (primary/auto_increment, not really interesting)
>> 2. "field", with encrypted data
>> 3. md5sum (it has no special use, we benched it though.)
>> 4. "line", always containing three words (the same three as encrypted)
>>
>> When we started querying the table for random words (from lipsum.com),
>> it seems that searching in the encrypted fields was _lots_ faster.
>> Results below:
>>
>> 1.000 queries per field:
>>
>> ~$ php -q searchtest.php
>> Control test (plain/text LIKE %..%): 1.409699s
>> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
>> done
>>
>> 1.000.000 queries per field:
>>
>> ~$ php -q searchtest.php
>> Control test (plain/text LIKE %..%): 155.059671s
>> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
>> done
>>
>> Actually, the only thing I could think of to say was: "Well, at least
>> it's consistent".
>>
>> I've attached all the files I used for this test. Edit db.inc.php (add
>> some more lipsum if you want), execute fill.php, and then have fun with
>> bench.php.
>>
>> Does any of you know why this is, how come, etc? I'm just very curious.
>>
>> Regards,
>>
>> John Kraal
>>
>> --
>> / Humanique
>> / Webstrategie en ontwikkeling
>> / http://www.humanique.com/
>>
>> -
>> Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
>> Bekijk de vacature op http://www.humanique.com/
>> -
>>

>
>
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 07:01 AM
Jeremy Cole
 
Posts: n/a
Default Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Hi John,

Your attachment for the php code got stripped somewhere. Can you post
it somewhere (http preferable)? In either case it's going to result in
a full table scan, so they are actually both a bad strategy long term,
but they should in theory perform as you would expect, with with
encryption being slightly slower.

Have you tried with longer strings?

What is your customer's fear with having the data in plain text?
Presumably in order to use this in your application, you will have the
AES password stored in your application, and it will end up in logs
(such as the slow query log) quite frequently. I would think your data
can be safer and your security more effective by setting some policies
which are less intrusive into the actual workings of the data, such as
encrypting backups and setting system-level policies.

Regards,

Jeremy

John Kraal wrote:
> Dear you,
>
> I've been working on encrypting some data for a customer. They want
> their personal/sensitive information encrypted in the database, but they
> want to be able to search it too, through the application. So we've been
> thinking a bit, and just started trying and benchmarking some solutions
> we thought up.
>
> The next one really got my attention, I created a table with 4 fields:
>
> 1. id (primary/auto_increment, not really interesting)
> 2. "field", with encrypted data
> 3. md5sum (it has no special use, we benched it though.)
> 4. "line", always containing three words (the same three as encrypted)
>
> When we started querying the table for random words (from lipsum.com),
> it seems that searching in the encrypted fields was _lots_ faster.
> Results below:
>
> 1.000 queries per field:
>
> ~$ php -q searchtest.php
> Control test (plain/text LIKE %..%): 1.409699s
> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
> done
>
> 1.000.000 queries per field:
>
> ~$ php -q searchtest.php
> Control test (plain/text LIKE %..%): 155.059671s
> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
> done
>
> Actually, the only thing I could think of to say was: "Well, at least
> it's consistent".
>
> I've attached all the files I used for this test. Edit db.inc.php (add
> some more lipsum if you want), execute fill.php, and then have fun with
> bench.php.
>
> Does any of you know why this is, how come, etc? I'm just very curious.
>
> Regards,
>
> John Kraal
>
>
>
> ------------------------------------------------------------------------
>
>


--
high performance mysql consulting
www.provenscaling.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 07:01 AM
John Kraal
 
Posts: n/a
Default Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

I put it here:

http://pro.datisstom.nl/tests/bench.tar.bz2

The encryption isn't really a *real* security measure, except for when
somebody is stupid enough to install phpMyAdmin or anything equivalent
and try to get personal data. The problem is the password needs to be
anywhere on the application-server and if you're in, you're in. But it's
a request and I'm happy to oblige. Even if it only stops them for 1
minute (which could be enough).

Regards,

John

--
/ Humanique
/ Webstrategie en ontwikkeling
/ http://www.humanique.com/

-
Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
Bekijk de vacature op http://www.humanique.com/
-


Jeremy Cole wrote:
> Hi John,
>
> Your attachment for the php code got stripped somewhere. Can you post
> it somewhere (http preferable)? In either case it's going to result in
> a full table scan, so they are actually both a bad strategy long term,
> but they should in theory perform as you would expect, with with
> encryption being slightly slower.
>
> Have you tried with longer strings?
>
> What is your customer's fear with having the data in plain text?
> Presumably in order to use this in your application, you will have the
> AES password stored in your application, and it will end up in logs
> (such as the slow query log) quite frequently. I would think your data
> can be safer and your security more effective by setting some policies
> which are less intrusive into the actual workings of the data, such as
> encrypting backups and setting system-level policies.
>
> Regards,
>
> Jeremy
>
> John Kraal wrote:
>> Dear you,
>>
>> I've been working on encrypting some data for a customer. They want
>> their personal/sensitive information encrypted in the database, but they
>> want to be able to search it too, through the application. So we've been
>> thinking a bit, and just started trying and benchmarking some solutions
>> we thought up.
>>
>> The next one really got my attention, I created a table with 4 fields:
>>
>> 1. id (primary/auto_increment, not really interesting)
>> 2. "field", with encrypted data
>> 3. md5sum (it has no special use, we benched it though.)
>> 4. "line", always containing three words (the same three as encrypted)
>>
>> When we started querying the table for random words (from lipsum.com),
>> it seems that searching in the encrypted fields was _lots_ faster.
>> Results below:
>>
>> 1.000 queries per field:
>>
>> ~$ php -q searchtest.php
>> Control test (plain/text LIKE %..%): 1.409699s
>> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
>> done
>>
>> 1.000.000 queries per field:
>>
>> ~$ php -q searchtest.php
>> Control test (plain/text LIKE %..%): 155.059671s
>> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
>> done
>>
>> Actually, the only thing I could think of to say was: "Well, at least
>> it's consistent".
>>
>> I've attached all the files I used for this test. Edit db.inc.php (add
>> some more lipsum if you want), execute fill.php, and then have fun
>> with bench.php.
>>
>> Does any of you know why this is, how come, etc? I'm just very curious.
>>
>> Regards,
>>
>> John Kraal
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>

>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 07:01 AM
Jeremy Cole
 
Posts: n/a
Default Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Hi John,

OK, no conspiracy here. Here is your problem:

25 $qry = sprintf("SELECT id, line FROM `encryptietest`
WHERE AES_DECRYPT(`field`, '%') LIKE '%%%s%%'", $enckey, $word);

You are missing the "s" in "%s" for your first string argument, which
causes the query to be syntactically incorrect and fail. So your AES
test is only testing how quickly you can query with a syntax error.

After adding the "s", the results I get are:

>>>>>

(jcole@hekla) [~/datisstom/bench]$ php -q bench.php
Control test (plain/text LIKE %..%): 1.383749s
Decrypt test (AES_DECRYPT() LIKE %..%): 1.441944s
done
<<<<<

Nonetheless, I'd still argue that this entire concept is doomed to
terrible performance anyway.

Regards,

Jeremy

John Kraal wrote:
> I put it here:
>
> http://pro.datisstom.nl/tests/bench.tar.bz2
>
> The encryption isn't really a *real* security measure, except for when
> somebody is stupid enough to install phpMyAdmin or anything equivalent
> and try to get personal data. The problem is the password needs to be
> anywhere on the application-server and if you're in, you're in. But it's
> a request and I'm happy to oblige. Even if it only stops them for 1
> minute (which could be enough).
>
> Regards,
>
> John
>
> --
> / Humanique
> / Webstrategie en ontwikkeling
> / http://www.humanique.com/
>
> -
> Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
> Bekijk de vacature op http://www.humanique.com/
> -
>
>
> Jeremy Cole wrote:
>> Hi John,
>>
>> Your attachment for the php code got stripped somewhere. Can you post
>> it somewhere (http preferable)? In either case it's going to result in
>> a full table scan, so they are actually both a bad strategy long term,
>> but they should in theory perform as you would expect, with with
>> encryption being slightly slower.
>>
>> Have you tried with longer strings?
>>
>> What is your customer's fear with having the data in plain text?
>> Presumably in order to use this in your application, you will have the
>> AES password stored in your application, and it will end up in logs
>> (such as the slow query log) quite frequently. I would think your data
>> can be safer and your security more effective by setting some policies
>> which are less intrusive into the actual workings of the data, such as
>> encrypting backups and setting system-level policies.
>>
>> Regards,
>>
>> Jeremy
>>
>> John Kraal wrote:
>>> Dear you,
>>>
>>> I've been working on encrypting some data for a customer. They want
>>> their personal/sensitive information encrypted in the database, but they
>>> want to be able to search it too, through the application. So we've been
>>> thinking a bit, and just started trying and benchmarking some solutions
>>> we thought up.
>>>
>>> The next one really got my attention, I created a table with 4 fields:
>>>
>>> 1. id (primary/auto_increment, not really interesting)
>>> 2. "field", with encrypted data
>>> 3. md5sum (it has no special use, we benched it though.)
>>> 4. "line", always containing three words (the same three as encrypted)
>>>
>>> When we started querying the table for random words (from lipsum.com),
>>> it seems that searching in the encrypted fields was _lots_ faster.
>>> Results below:
>>>
>>> 1.000 queries per field:
>>>
>>> ~$ php -q searchtest.php
>>> Control test (plain/text LIKE %..%): 1.409699s
>>> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
>>> done
>>>
>>> 1.000.000 queries per field:
>>>
>>> ~$ php -q searchtest.php
>>> Control test (plain/text LIKE %..%): 155.059671s
>>> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
>>> done
>>>
>>> Actually, the only thing I could think of to say was: "Well, at least
>>> it's consistent".
>>>
>>> I've attached all the files I used for this test. Edit db.inc.php (add
>>> some more lipsum if you want), execute fill.php, and then have fun
>>> with bench.php.
>>>
>>> Does any of you know why this is, how come, etc? I'm just very curious.
>>>
>>> Regards,
>>>
>>> John Kraal
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>

>


--
high performance mysql consulting
www.provenscaling.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 07:01 AM
John Kraal
 
Posts: n/a
Default Re: Query performance plain/text versus AES_DECRYPT(): LIKE %..%

Auch, thanks for pointing that out, what a terrible mistake.

I am aware of the performance issue, and so is the customer. But with a
table that's only going to hold maximally 60.000 records in 10 years,
I'm not afraid it'll cause significant problems. If it gets out of hand
we'll have to think of a better solution.

Once again, thanks!

John

--
/ Humanique
/ Webstrategie en ontwikkeling
/ http://www.humanique.com/

-
Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
Bekijk de vacature op http://www.humanique.com/
-


Jeremy Cole wrote:
> Hi John,
>
> OK, no conspiracy here. Here is your problem:
>
> 25 $qry = sprintf("SELECT id, line FROM `encryptietest`
> WHERE AES_DECRYPT(`field`, '%') LIKE '%%%s%%'", $enckey, $word);
>
> You are missing the "s" in "%s" for your first string argument, which
> causes the query to be syntactically incorrect and fail. So your AES
> test is only testing how quickly you can query with a syntax error.
>
> After adding the "s", the results I get are:
>
> >>>>>

> (jcole@hekla) [~/datisstom/bench]$ php -q bench.php
> Control test (plain/text LIKE %..%): 1.383749s
> Decrypt test (AES_DECRYPT() LIKE %..%): 1.441944s
> done
> <<<<<
>
> Nonetheless, I'd still argue that this entire concept is doomed to
> terrible performance anyway.
>
> Regards,
>
> Jeremy
>
> John Kraal wrote:
>> I put it here:
>>
>> http://pro.datisstom.nl/tests/bench.tar.bz2
>>
>> The encryption isn't really a *real* security measure, except for when
>> somebody is stupid enough to install phpMyAdmin or anything equivalent
>> and try to get personal data. The problem is the password needs to be
>> anywhere on the application-server and if you're in, you're in. But
>> it's a request and I'm happy to oblige. Even if it only stops them for
>> 1 minute (which could be enough).
>>
>> Regards,
>>
>> John
>>
>> --
>> / Humanique
>> / Webstrategie en ontwikkeling
>> / http://www.humanique.com/
>>
>> -
>> Humanique zoekt een ervaren Web-ontwikkelaar (PHP).
>> Bekijk de vacature op http://www.humanique.com/
>> -
>>
>>
>> Jeremy Cole wrote:
>>> Hi John,
>>>
>>> Your attachment for the php code got stripped somewhere. Can you
>>> post it somewhere (http preferable)? In either case it's going to
>>> result in a full table scan, so they are actually both a bad strategy
>>> long term, but they should in theory perform as you would expect,
>>> with with encryption being slightly slower.
>>>
>>> Have you tried with longer strings?
>>>
>>> What is your customer's fear with having the data in plain text?
>>> Presumably in order to use this in your application, you will have
>>> the AES password stored in your application, and it will end up in
>>> logs (such as the slow query log) quite frequently. I would think
>>> your data can be safer and your security more effective by setting
>>> some policies which are less intrusive into the actual workings of
>>> the data, such as encrypting backups and setting system-level policies.
>>>
>>> Regards,
>>>
>>> Jeremy
>>>
>>> John Kraal wrote:
>>>> Dear you,
>>>>
>>>> I've been working on encrypting some data for a customer. They want
>>>> their personal/sensitive information encrypted in the database, but
>>>> they
>>>> want to be able to search it too, through the application. So we've
>>>> been
>>>> thinking a bit, and just started trying and benchmarking some solutions
>>>> we thought up.
>>>>
>>>> The next one really got my attention, I created a table with 4 fields:
>>>>
>>>> 1. id (primary/auto_increment, not really interesting)
>>>> 2. "field", with encrypted data
>>>> 3. md5sum (it has no special use, we benched it though.)
>>>> 4. "line", always containing three words (the same three as encrypted)
>>>>
>>>> When we started querying the table for random words (from lipsum.com),
>>>> it seems that searching in the encrypted fields was _lots_ faster.
>>>> Results below:
>>>>
>>>> 1.000 queries per field:
>>>>
>>>> ~$ php -q searchtest.php
>>>> Control test (plain/text LIKE %..%): 1.409699s
>>>> Decrypt test (AES_DECRYPT() LIKE %..%): 1.226069s
>>>> done
>>>>
>>>> 1.000.000 queries per field:
>>>>
>>>> ~$ php -q searchtest.php
>>>> Control test (plain/text LIKE %..%): 155.059671s
>>>> Decrypt test (AES_DECRYPT() LIKE %..%): 137.003216s
>>>> done
>>>>
>>>> Actually, the only thing I could think of to say was: "Well, at
>>>> least it's consistent".
>>>>
>>>> I've attached all the files I used for this test. Edit db.inc.php
>>>> (add some more lipsum if you want), execute fill.php, and then have
>>>> fun with bench.php.
>>>>
>>>> Does any of you know why this is, how come, etc? I'm just very curious.
>>>>
>>>> Regards,
>>>>
>>>> John Kraal
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>>

>>

>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472