@# 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



Comments:

<gleam-> you'd have to have more than one insert thread
<gleam-> and presumably then more than one connection
<gleam-> you can also use the bulk insert syntax
<gleam-> insert into mytable (mycollist) values (x,y),(a,b),(c,d)
<gleam-> i don't know how you're getting the data you're inserting
<gleam-> or if it's even all going into the same tables
<mandric> hello, i'm writing a small cms and am wondering if i should use MyISAM tables or InnoDB. any comments? I figure only the content tables (the ones most changed) should be InnoDB.
<multifarious> it's just one table, but that's quite helpful gleam-, I'll play around with it and let you know
<datasieve> except isn't supported in mysql, or is it under a different name?
<gleam-> pardon?
<gleam-> what are you trying to do?
<datasieve> the keyword except, (select * from T1) except (select * from T2)
<mercestes> select concat(*) as all from T1 where all not in (select concat(*) from T2)
<mercestes> >.>
<will[werk]> huh?
<mercestes> hmm?
<will[werk]> >.>
<will[werk]> wtf is that?
<mercestes> oh..*shifty eyes*
<mercestes> >.>
<will[werk]> Shifty eyes???
<mercestes> Almost like <.<
<mercestes> but different.
<gleam-> oookay
<gleam-> that's a new one to me too
<will[werk]> I don't like it.
<will[werk]> Don't do it again. Ever.
<mercestes> oh....
<gleam-> yahahaha
<mercestes> *hangs head* yessir.
<gleam-> >.>
<will[werk]> GRRRR
<gleam-> hey, you didn't say i couldn't.
<mercestes> *started something*
<mercestes> It's better than my vampire bat.
<mercestes> ^;.;^
<gleam-> oh lord
<gleam-> that's truly awful
<will[werk]> .
<uberpenguin> is there any way to cause a mysql select query to have a maximum execution time after which it is killed automagically?
<hansbrix> holy **** a bat
<hansbrix> oh phew its only ascii.
<JSDude> I need to find the max of three columns
<hansbrix> uberpenguin: stopwatch and hand on the server's power button is usually how i handle such an instance
<JSDude> I can't use MAX, because they're three columns in one row
<gleam-> write a script to run show processlist periodically and kill the ones that are running longer than X seconds
<mercestes> Self joins maybe?
<hansbrix> JSDude: self-joins is an option there, but not very efficient
<uberpenguin> feh... I was worried that was the only good way
<hansbrix> JSDude: i'd recommend just using a case structure
<shift8> hey guys - can you put a limit in a join?
<JSDude> hmm
<gleam-> why can't you use max jsdude?
<JSDude> because it's not the max of the rows of a particular column
<JSDude> it's the max of three columns in a each row
<gleam-> max(col1+col2+col3)?
<hansbrix> shift8: you could either make a compound join clause on x.z = y.z and y.z in (limit subselect here), or you could just make the second join a derived table with the limit in the select statement
<hansbrix> shift8: maybe there's an easier way in mysql though
<gleam-> order by col1 desc,col2 desc,col3 desc limit 1?
<BlazeBud> hi is there a simple tool that allows me to migrate a database schema to an updated schema? i've made too many changes to the schema to go through by hand and change the old schema attribute by attribute.
<JSDude> gleam... that clearly wouldn't work
<hansbrix> gleam-: i think he wants to return the max column of each row
<gleam-> oh, which of the three is largest?
<hansbrix> gleam-: he didnt actually mean "max".
<shift8> hansbrix: thanks = temp table solution sounds like the way to go.
<hansbrix> shift8: yeah that's how i'd do it, with a derived table
<mercestes> Oh
<mercestes> select max(Col1), max(col2), max(col3) from table.
<gleam-> i already suggested that
<gleam-> he didn't want that
<hansbrix> no he wants select case when col1 > col2 and col1 > col3 then col etc
<hansbrix> or use self-joins, but for 3 columns yeah case works
<JSDude> :)
<JSDude> how would a self-join operate in this case?
<mercestes> Yeas trying to see if you could Max(Max(col1), max(col2)) but Mysql no likey
<gleam-> jsdude, what exactly are you trying to do?
<hansbrix> JSDude: dont you want to return every row, with the one column that's the highest value of the 3 columns, for said row?
<JSDude> get the max of three cols (col1, col2, and col3) in each row
<JSDude> yes
<hansbrix> alrighty then
<JSDude> actually min... but it's the same concept
<gleam-> if(if(col1>col2,col1,col2)>col3,if(col1>col2,col1,col2),col3))
<gleam-> lose one of the )s
<JSDude> I could just use case
<gleam-> so use case
<JSDude> indeed
<hansbrix> either way
<JSDude> I was curious about self-joins
<JSDude> that's all
<hansbrix> or do the joins if you want
<gleam-> just use case
<BlazeBud> hi is there a simple tool that allows me to migrate a database schema to an updated schema? i've made too many changes to the schema to go through by hand and change the old schema attribute by attribute.
<mercestes> or submit a bug report to MySQL that MySQL doesn't support nested min/max statements.
<domas> that would be feature request!
<gleam-> still file at it bugs.mysql.com :)
<domas> hey Azundris
<hansbrix> JSDude: something like select max(col) from mytable mt1 inner join (select key, col1 as col from mytable) mt2 on (mt1.key = mt2.key) inner join (select key, col2 as col from mytable) mt3 on (mt1.key = mt3.key) inner join (select key, col3 as col from mytable) mt4 on (mt1.key = mt4.key)
<hansbrix> group by mt1.key
<domas> Azundris: can you code one feature for me, pretty pretty please!
<hansbrix> is what i meant by self-join, really derived table but yeah, to satisfy your curiosity
<domas> that'd be small morning exercise for y ou
<hansbrix> i'm sure that could be more efficient but you get the idea
<Azundris> domas: It's 2331 here. : ) Note all the black stuff around the big pointy. ; ) http://www.images1-abcparislive.com/eiffel2.jpg
<domas> Azundris: best time for features!
<Azundris> LOL
<Azundris> What are talking about, anyway? : )
<mercestes> Max(col1, col2, col3) easy enough..right?
<mercestes> -.-
<domas> Azundris: I want to execute all deterministic items before JOIN::execute() :)
<hansbrix> i didnt know you can do that in mysql
<domas> or even before optimize()
<hansbrix> i wonder if you can do that in tsql
<hansbrix> i cant say i've ever had to select the greatest of 3 different columns, sounds like poor normalization for that case to arise
<Azundris> I want a pony. : )
<domas> or in optimize() of course
<hansbrix> so i guess you could just select key, max(col1, col2, col3) from mytable group by key?
<domas> hey, this one is real
<domas> ponies do not exist
<mercestes> subqueries in delete from would be ncie too.
<hansbrix> mysql doesnt support that?
<hansbrix> heh
<mercestes> not that I know of.
<hansbrix> cant imagine why not
<gniretar_work> hi all
<hansbrix> it has to support delete subqueries
<shift8> the pain!!! when are they going to speed up subselects????
<gniretar_work> so for the past new days i have been fighting with Oracle
<hansbrix> shift8: yeah i hear in mysql they're painfully slow
<QueryKiller> slay Oracle I say
<mercestes> Try it...
<gniretar_work> it makes me appriciate the things in life which are less painful
<gniretar_work> like MySQL
<mercestes> last I checked delete from Blah where something in (select blah from table) doesn't work too well.
<hansbrix> shift8: one of the few times i dont mind being stuck on sql server 2000...the syntax and functionality of t-sql may bite the big one, but at least its efficient/fast
<SpComb> but there are multitudes out there that say mysql ****s...
<gniretar_work> or advance math
<mercestes> but thyat could beeen from Mysql 1.69 or something.
<gniretar_work> that is easier then Oracle
<gniretar_work> or installing Linux on my toaster
<gniretar_work> that would also be easier then Oracle
<HarrisonF> JSDude: use GREATEST
<gniretar_work> Jave must die
<gniretar_work> Java*
<JSDude> do those work in mysql
<shift8> mercestes: yup - you described a subselect, and i don't think mysql got them till around 3.6xx or so.
<HarrisonF> select greatest(5, 10);
<shift8> i can't beleave no one has hacked a mysql client into a bot on this chan.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#lisp
linxbios
#lisp
#perl
xenguest-install, operation not permitted
xorg.conf Screens found but none have a useable configuration
#debian
gentoo eth0 does not exist broadcom
yum No Match for argument: spamassassin
#python



Home  |  disclaimer  |  contact  |  submit quotes