@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18



Comments:

<0> mysqldump --help | grep max_allowed_packet
<1> mendel: hang on
<1> mendel: 1047552
<1> mmm it that the maximum individual row/field size?
<0> right
<0> 1GB max packet is... big, unless you have huge blobs or something
<1> oh so i just give it like 100mb there and that's it
<0> but you need to increase mysqldump's, too
<1> I guess i only have to modify mysqldump's since the file got there somehow, it's reasonable to expect mysqld has the necessary size set, right?
<2> why would you need to increase the max packet size? shouldn't --quick (which is part of --opt which is enabled by default) dump 1 row at a time?
<0> mysqldump --max_allowed_packet=128M # or whatever value works
<0> redace: One row might be bigger than 1MB.
<2> mendel, oh his max packet size was 1 MB?
<0> redace: On mysqldump, yes
<2> ahhh ok =)
<1> Is my last statement reasonable?



<2> GomoX, try it?
<0> gomox: easy to just check both values
<3> mysql> SHOW VARIABLE LIKE 'max_allowed_packet'; -- on he server
<0> no need to worry about reasonable expectations
<1> mendel: yes i'll do that
<1> heh
<1> yep it was at 100M
<2> \o/
<4> is there any quick way to do this (w/ a mysql query)? i select a certain amount of entries from table FOO (all with unique IDs)... i want to select all entries from table BAR that have foo_id = {the id's i selected from FOO}
<5> grav: use a subquery if your version allows it
<4> got a doc?
<5> select * from foo where bar_id IN (select bar_id from bar where somethingelse)
<4> oh very nice
<3> use a Join!
<2> I agree
<2> use a join
<4> kemurii: really? i was wondering about that. is that possible?
<4> hmm ok
<4> i'm going to have to read the join docs more closely
<2> almost every subquery can be rewritten as a join
<4> thanks guys
<4> oh really?
<5> true, but my answer fit his question so nicely :)
<2> and will almost always be more efficient
<4> oh?
<3> shabbs: ya lazy!11
<4> i like efficiency
<4> lol
<5> Kemurii: I'm working on 4 hours of sleep, sue me :D
<3> shabbs: you sir, are an idiot! ;)
<6> Is it difficult to set up a mysql cluster that uses 2 computers?
<3> Jonas_: nope
<2> lol
<6> Sounds good.
<3> Jonas_: but it ain't good for production
<5> Kemurii: I'm an idiot for being tired? :D
<6> I got a server that runs around the clock, the hardware however is nothing short of horrible, while I got this machine, which is beyond the usual, regardless it is not up 24/7, I got a reboot or two every other day
<3> Jonas_: 2 data notes on 2 machines, and a management server on another machine, while the MySQL node can be toogether with the ndb_mgmd
<3> shabbs: no, 4 hours of sleep yes ;)
<5> Kemurii: if I had a choice I would've slept 12, but my 2.5 month old had other ideas
<3> shabbs: aaaahhh, kids, that's something else
<3> shabbs: you sir, are so lucky!
<5> I know :)
<2> lies. it's a trap.
<6> So a management server on a stable machine, and then data nodes on whatever machines I wish to include in the cluster and thats it?
<6> And its not hard to set a specific data node as 'primary' sort of? so I only use the slow machine when there is no other choice?
<3> Jonas_: it's a Cluster
<3> Jonas_: Data nodes are the same (in a group), they are used equally (kinda)
<6> Yes, but will it then work efficiently given that this machine has 4x the ram, 100x the CPU power and so forth compared to the other?
<3> Jonas_: they have to have equal RAM size
<6> Ack.
<7> the DB is held 100% in ram
<6> Impossible then, must find another way to do what I intend to
<7> the 5.2 i think is supposed to utelize the physical memory HDD
<3> Jonas_: and, well, there should be to much performance differce, but generally better to have same machines for data nodes
<6> Okay
<3> Jonas_: 5.1 has some diskbased cluster, but might not make it in stable, have to see
<3> still have indexes in memory though, and the fields used by that index
<8> why does this return 126 results select distinct(w.adsid) from webperfreports as w right join ads as a on a.adsid = w.adsid and i remove the distinct and it returns 60,000
<3> Jonas_: maybe you just need replication, and something to hot swap etc? or just better hardware? :)
<6> What I need is basically 2 machines iwth the same database, where 1 is used when available, and other is used when there is no other way, is this possible to set up with mysql or do I need to do that through the program I interface to mysql with?



<6> Better hardware is not an option at the moment, replication would probably do it if I knew how to work with it.
<6> Just read a bit up on cluster and it sounded like what I wanted
<3> Jonas_: Repliation, and swap you do yourself
<6> okay, shouldnt be impossible.
<3> Jonas_: Cluster if for High Availability, but you are limited to RAM
<3> (right now)
<6> Is there an 'easy to follow guide to set up replication' that even "newbies" can use?
<3> Jonas_: yup, in our manual, Replication section
<6> Thanks
<6> !man replication
<9> (Replication in MySQL) : http://dev.mysql.com/doc/mysql/en/Replication.html
<3> direct link: http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html
<3> or 4.1 if in 4.0, not much diff
<3> erm
<3> yes
<6> thanks :)
<3> Jonas_: btw, swapping to the machine who is in standby is sometimes a pain.. if Master just is rebooting and it comes up in a few moments (minutes), then you better wait for Master to come back
<3> *how
<3> werm
<3> no
<3> ARGCH
<6> Someone needs a new keyboard or a new set of hands it seems :)
<8> did anyone see my right join / distinct question
<3> Jonas_: I'm sinking to much
<3> albo: yes, don't see problem
<3> albo: distinct is about giving you distinct rows, which is 126 over 60000 rows?
<8> Kemurii: the webperfreports has 126 unique, the ads has 60k
<8> Kemurii: wait
<8> Kemurii: the webperfreports has 125 unique, the ads has 60k
<8> the 126 is because there are 126 in ads of a certain type, its just that 1 of them has no data in webperfreports but i want to get all ads if possible
<3> albo: what do you think to achieve using DISTINCT there?
<8> i dont know. i was just playing around
<10> Doesn't user@% indicate that that user should be able to connect from any host?
<3> albo: ok, maybe you need to find the correct problem then look for query :)
<7> DogWater, yes
<3> DogWater: user@'%', yup
<3> DogWater: but maybe not to every database?
<3> or table
<8> Kemurii: when run distinct(w.adsid) it runs very fast, when i select distinct(w.adsid),a.* it takes thousands of times longer
<11> how reliable is LAST_INSERT_ID?
<8> loef: 100%
<11> k
<8> you should understand what a connection is
<8> its last_insert_id for the connection
<11> so i don't need to lock the table or anything like that
<3> albo: not sure why you use DISTINCT as a function there..
<3> albo: use a LEFT JOIN
<8> Kemurii: i fixed it. i included a where adtype='web' and that did it with the distinct
<3> albo: FROM a LEFT JOIN b ON a.id = b.id
<12> Is there a way to alias a individual entities in a field
<12> for example if two entities have identical properties
<3> UncleD: SELECT tab1.id AS `tab1_id`, tab2.id AS `tab2_id` FROM tab1, tab2....
<3> UncleD: that?
<12> I guess that might be it.
<12> Basically if I have two engine parts: FooB and FooC and referred to as different names by Napa and Triple-A
<13> hmm, if I'm building a program linking against the C api, and I do this: g++ -o ./bah.testing.mysql `mysql_config --libs --include` test5.cpp , and the path to the mysql libs is in my ld.so.conf, any idea why ld could complain that it can't find -lmysqlcient ?
<12> Napa calls the part: FooB and TripleA calls it FooC
<12> but it's identical, same part.
<6> http://pastebin.com/570693 <-- Can anyone help me somehow gather these 5 queries into 1 query, so I can fetch the data of them all comma seperated or the likes?
<3> UncleD: better use terms like 'tables', 'schema' (or 'database'), 'columns'....
<12> ah.
<1> Is it reasonable that the mysql_dump output weighs around the same that /var/lib/mysql?
<3> UncleD: I'm having a hard time to follow your toughts ;)
<12> The column is the name field (column) in a table called parts.
<12> We're talking about car engine parts.
<3> Jonas_: UNION is your friend
<12> For example, Napa refers to the exhaust pipe as: "Exhaust pipe" TripleAAA calls it: "Flow tube"
<6> I've been told, however....
<3> Jonas_: but use SELECT '30 days', COUNT(*) ...
<12> so in my database, should they just be seperate entires with unique id's?
<6> My skills as far as UNION goes are rather limited
<3> Jonas_: time to read up in manual and start playing ! :)
<12> Kemurii: Am I making sense yet?
<6> Heheh. Trust me, I've been working on that one for quite a while now *sigh*


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

#web
+MYSQL +querry +number +substring
#perl
#linux
#lisp
#perl
ifconfig eth del
#perl
gentoo grub append correct boot option
xf86setup ubuntu



Home  |  disclaimer  |  contact  |  submit quotes