Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Fetch Mysql huge database

by fisher (Priest)
on Sep 29, 2011 at 06:22 UTC ( #928468=note: print w/replies, xml ) Need Help??

in reply to Fetch Mysql huge database

The main idea behind this database thingie is that you do not need to fetch the whole dataset to client. If you do need it, which is a rare case, it is a bad system design. In most cases, however, you need only a small subset of stored data, and your job is to select it properly.

Second, the mysql server itself can operate too slow in some circumstances -- e.g. no index on 'UserName' field can produce inappropriate time consumption. How many time it takes when you select above dataset from mysql client itself?

Third, you need a space, a memory to store this dataset locally on your client; did you count how much memory do you need to store your 34748806 rows?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928468]
[Lady_Aleena]: Why does grep(/.*$in.*/, @my_modules) work but grep { $_ =~ /.*$in.*/; $_ } @my_modules not work? What did I do wrong in the second?
[tobyink]: Why are you returning $_ n your grep block? You should return a boolean.
[tobyink]: *in your grep block
[tobyink]: You can use grep { $_ =~ /.*$in.*/; } @my_modules but why not stick to grep(/.*$in.*/, @my_modules)? (The latter is faster.)
[shmem]: Lady_Aleena, in the first example grep evaluates the result from grep and if true, returns $_. In the second, it always returns $_

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-05-27 07:38 GMT
Find Nodes?
    Voting Booth?