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

<0> you'd have to have more than one insert thread
<0> and presumably then more than one connection
<0> you can also use the bulk insert syntax
<0> insert into mytable (mycollist) values (x,y),(a,b),(c,d)
<0> i don't know how you're getting the data you're inserting
<0> or if it's even all going into the same tables
<1> 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.
<2> it's just one table, but that's quite helpful gleam-, I'll play around with it and let you know
<3> except isn't supported in mysql, or is it under a different name?
<0> pardon?
<0> what are you trying to do?
<3> the keyword except, (select * from T1) except (select * from T2)
<4> select concat(*) as all from T1 where all not in (select concat(*) from T2)
<4> >.>
<5> huh?
<4> hmm?



<5> >.>
<5> wtf is that?
<4> oh..*shifty eyes*
<4> >.>
<5> Shifty eyes???
<4> Almost like <.<
<4> but different.
<0> oookay
<0> that's a new one to me too
<5> I don't like it.
<5> Don't do it again. Ever.
<4> oh....
<0> yahahaha
<4> *hangs head* yessir.
<0> >.>
<5> GRRRR
<0> hey, you didn't say i couldn't.
<4> *started something*
<4> It's better than my vampire bat.
<4> ^;.;^
<0> oh lord
<0> that's truly awful
<5> .
<6> is there any way to cause a mysql select query to have a maximum execution time after which it is killed automagically?
<7> holy **** a bat
<7> oh phew its only ascii.
<8> I need to find the max of three columns
<7> uberpenguin: stopwatch and hand on the server's power button is usually how i handle such an instance
<8> I can't use MAX, because they're three columns in one row
<0> write a script to run show processlist periodically and kill the ones that are running longer than X seconds
<4> Self joins maybe?
<7> JSDude: self-joins is an option there, but not very efficient
<6> feh... I was worried that was the only good way
<7> JSDude: i'd recommend just using a case structure
<9> hey guys - can you put a limit in a join?
<8> hmm
<0> why can't you use max jsdude?
<8> because it's not the max of the rows of a particular column
<8> it's the max of three columns in a each row
<0> max(col1+col2+col3)?
<7> 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
<7> shift8: maybe there's an easier way in mysql though
<0> order by col1 desc,col2 desc,col3 desc limit 1?
<10> 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.
<8> gleam... that clearly wouldn't work
<7> gleam-: i think he wants to return the max column of each row
<0> oh, which of the three is largest?
<7> gleam-: he didnt actually mean "max".
<9> hansbrix: thanks = temp table solution sounds like the way to go.
<7> shift8: yeah that's how i'd do it, with a derived table
<4> Oh
<4> select max(Col1), max(col2), max(col3) from table.
<0> i already suggested that
<0> he didn't want that
<7> no he wants select case when col1 > col2 and col1 > col3 then col etc
<7> or use self-joins, but for 3 columns yeah case works
<8> :)
<8> how would a self-join operate in this case?
<4> Yeas trying to see if you could Max(Max(col1), max(col2)) but Mysql no likey



<0> jsdude, what exactly are you trying to do?
<7> JSDude: dont you want to return every row, with the one column that's the highest value of the 3 columns, for said row?
<8> get the max of three cols (col1, col2, and col3) in each row
<8> yes
<7> alrighty then
<8> actually min... but it's the same concept
<0> if(if(col1>col2,col1,col2)>col3,if(col1>col2,col1,col2),col3))
<0> lose one of the )s
<8> I could just use case
<0> so use case
<8> indeed
<7> either way
<8> I was curious about self-joins
<8> that's all
<7> or do the joins if you want
<0> just use case
<10> 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.
<4> or submit a bug report to MySQL that MySQL doesn't support nested min/max statements.
<11> that would be feature request!
<0> still file at it bugs.mysql.com :)
<11> hey Azundris
<7> 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)
<7> group by mt1.key
<11> Azundris: can you code one feature for me, pretty pretty please!
<7> is what i meant by self-join, really derived table but yeah, to satisfy your curiosity
<11> that'd be small morning exercise for y ou
<7> i'm sure that could be more efficient but you get the idea
<12> domas: It's 2331 here. : ) Note all the black stuff around the big pointy. ; ) http://www.images1-abcparislive.com/eiffel2.jpg
<11> Azundris: best time for features!
<12> LOL
<12> What are talking about, anyway? : )
<4> Max(col1, col2, col3) easy enough..right?
<4> -.-
<11> Azundris: I want to execute all deterministic items before JOIN::execute() :)
<7> i didnt know you can do that in mysql
<11> or even before optimize()
<7> i wonder if you can do that in tsql
<7> i cant say i've ever had to select the greatest of 3 different columns, sounds like poor normalization for that case to arise
<12> I want a pony. : )
<11> or in optimize() of course
<7> so i guess you could just select key, max(col1, col2, col3) from mytable group by key?
<11> hey, this one is real
<11> ponies do not exist
<4> subqueries in delete from would be ncie too.
<7> mysql doesnt support that?
<7> heh
<4> not that I know of.
<7> cant imagine why not
<13> hi all
<7> it has to support delete subqueries
<9> the pain!!! when are they going to speed up subselects????
<13> so for the past new days i have been fighting with Oracle
<7> shift8: yeah i hear in mysql they're painfully slow
<14> slay Oracle I say
<4> Try it...
<13> it makes me appriciate the things in life which are less painful
<13> like MySQL
<4> last I checked delete from Blah where something in (select blah from table) doesn't work too well.
<7> 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
<15> but there are multitudes out there that say mysql ****s...
<13> or advance math
<4> but thyat could beeen from Mysql 1.69 or something.
<13> that is easier then Oracle
<13> or installing Linux on my toaster
<13> that would also be easier then Oracle
<16> JSDude: use GREATEST
<13> Jave must die
<13> Java*
<8> do those work in mysql
<9> mercestes: yup - you described a subselect, and i don't think mysql got them till around 3.6xx or so.
<16> select greatest(5, 10);
<9> 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