r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[All] except covered in other channels

Graham
22-Jan-2005
[735]
and if you have 1million files in the local directory?
Terry
22-Jan-2005
[736x3]
good question... and one million files in the DB as well.
10000 iterations using the load file method.. 0:00:00.781
I doubt very much that the DB could do that.
Graham
22-Jan-2005
[739]
and then later on if you need to copy the 1million files from the 
filing system, or copy the mysql database .. which is faster?
Terry
22-Jan-2005
[740x3]
another good point.. think ill load up a directory with a few 100,000 
files and see what happens ;)
If you dont' here from me, you'll know that I mashed my drive :)
hear, that is
Graham
22-Jan-2005
[743]
well, copying the messages from ios took absolutely ages ...
Terry
22-Jan-2005
[744x2]
10,000 iterations .. folder has 100,000 27byte files  - 0:00:00.765 
seconds
Took awhile to create 100,000 27 byte files.. long after the rebol 
script had finished, the os was still handling the cache...
Size: 2.57mb
Size on Disk: 390 mb
Graham
22-Jan-2005
[746]
but we needed 28 byte files to test this out!
Terry
22-Jan-2005
[747]
I think the results speak volumes.
Graham
22-Jan-2005
[748]
and how much space does the db require to store the same data?
Terry
22-Jan-2005
[749]
don't know
Graham
22-Jan-2005
[750]
Does anyone know how to setup a subject filter in gmail?  Can you 
do wild cards like *[Rebol]* for subject filters?
Terry
22-Jan-2005
[751x2]
size of DB approx 36 mb.
Took about 6 mins to move the directory.   So it appears to be a 
trade off.
Benefits of using files... 

- much more flexible (ie: a 10mb binary file in a DB is not a good 
idea)
- easier to manipulate.
- magnitude faster access time
Tomc
23-Jan-2005
[753]
the magnitude faster time breaks down pretty quickly when you need 
to retrive a file based on it contents not its title
Terry
23-Jan-2005
[754]
No, my experiments were using the file AND it's contents via SELECT
Tomc
23-Jan-2005
[755x2]
using indexes in your database?
primary key?
Terry
23-Jan-2005
[757]
my DB only had a single row.
Tomc
23-Jan-2005
[758]
that does not answer my question
Terry
23-Jan-2005
[759]
and no, it wasn't indexed :)
Tomc
23-Jan-2005
[760]
there should be an imprivement with any indexing
Terry
23-Jan-2005
[761]
not only that, MySQL via the protocol couldn't handle the 'rapid 
fire' query rate.
Graham
23-Jan-2005
[762]
sure .. doing a DOS attack on mysql://
Terry
23-Jan-2005
[763]
exactly
Tomc
23-Jan-2005
[764x2]
so if you only have one row  what is the difference between athe 
fontents of a given file and its name?
contents
Terry
23-Jan-2005
[766]
the contents of the file, and the row inthe DB were identical.. a 
word °email°, and an email address
Tomc
23-Jan-2005
[767x2]
relational databases start to be useful when they are given relations 
which typically require more than one column
it is hard to relate apples and oranges if you only have apples
Terry
23-Jan-2005
[769x3]
ahh, but I have relations as well with °7°
in fact, my relations can be spread across the net
so the net becomes on big relational DB.. just without the archaic 
DB system.
Tomc
23-Jan-2005
[772x3]
Im happy for you but to have your test make sense the relation should 
be in the relational database
in the file system the file name is a key and the contents a value
the same in a db would nbe two colums one for the name one for the 
value
Terry
23-Jan-2005
[775]
well, why not run some tests yourself and let us know the results... 
talk is cheap.
Tomc
23-Jan-2005
[776]
the nales and falued are relatted
Terry
23-Jan-2005
[777]
i had two columns in the DB ..
Tomc
23-Jan-2005
[778x3]
in a database you could give a value and return the keys as easly 
as give the keys and return the values
in a filesystem thsi is much less symetric
if one cloum cintained a constant it ought not have been there
Terry
23-Jan-2005
[781]
But the DB uses the filesystem as well?  So in essence, you are skipping 
a step
Tomc
23-Jan-2005
[782]
the db you are using very likely uses "cooked"  storage, but  more 
advanced db use raw disk the filesystem knows nothing od and does 
not touch
Terry
23-Jan-2005
[783]
well, I use MySQL.. pretty much standard these days
Tomc
23-Jan-2005
[784]
I am just starting to use mysql a little bit and it is a great step 
up from plain old flatfiles it is constantly improving  a cinch to 
administer, but limited for complex relations