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



Comments:

<0> beebum: but would that actually change the privs too? because the problem is that we have a java thing that's leaving lots of stale connections
<0> so I don't want to remove the user's privs, just blow away near-(but not completely)-dead sessions
<1> if you have a HUGE table, and you do "select * from HUGEtable" will this be very slow?
<2> i think there is an envirement variable for that
<2> search the manual
<0> hrh?
<0> I've been searching, no luck yet...
<2> reduces the timeout for stale connections i think
<0> was asking here to hope to dodge an hour of googling. I'm also stuck on 4.1 .
<0> naw, that's not working, they're sticking around for weeks
<3> anyone?
<4> http://weblogs.sqlteam.com/jeffs/archive/0001/01/01/5248.aspx <-- if you happen to have some time to waste and wanna have a laugh.
<0> it's actually ****ty java code that's the problerm.
<1> if you have a HUGE table, and you do "select * from HUGEtable" will this be very slow?
<5> Thanks guys. Vb is installing nicely :)
<0> jaks: find out the hard way, then learn to write a good query



<2> Hydra, http://tyson.homeunix.org/notes/mysql.html
<0> beebum: http://dev.mysql.com/doc/refman/4.1/en/kill.html
<1> MyQuiL just answer to my ****ing question! NOW!!!
<0> I think that's it.
<0> jaks: sure, but I'm a consultant, I work for $200 an hour.
<0> want me to send you a contract? .pdf form?
<2> cool
<0> then google for "smart questions"
<1> 200 dollar per hour ? what you do for that
<0> ignore punks on IRC.
<3> beebum, that's useless to me
<1> you **** my cock for that??
<0> SpComb: oh - I try not to have to write code :)
<6> consultants write fun code
<3> i want to know why mysqlimport doesn't have a "--table=" parameter like it should
<0> SpComb: sorry to disappoint :)
<3> so i can import a small test set of data into my regular table
<7> Wow such an attitude in this room
<3> and have two files, one called "lotsofdata.txt" one called "smallamountofdata.txt" and import whichever one i feel like into "TableA"
<1> yes they dont want to answer to My question , you have to pay these ****erz!
<2> Hydra, unless i misunderstand your needs, i think the load_data should work
<8> hydra: Make a symlink.
<9> p_mash: so you are saying that mysql never takes advantage of multiple CPUs?
<3> i quote "Loads tables from text files in various formats. The base name of the text file must be the name of the table that should be used."
<3> no, don't want to make a symlink (and can't on windows anyway....)
<3> just seems really daft that the option isn't there
<3> seems really backwards
<8> Well, then, don't. But you're not talking to the MySQL developers, so I'm not sure what you want us to do.
<2> just use load_data like i show
<3> rename a file? crate a symlink? no, just an extra parameter please
<10> time for a mysql bugreport i think
<2> mysql> load data infile 'fullpathandfilename' into table sometable;
<11> in a self recursive table where the top node of the tree is parent_id=null whats the best way to find the start of a tree with a child in the tree? create a function?
<12> i hate phpbb ;]
<2> Drakas, there are lots of alternatives. ;)
<13> Hey, For a query I'm writing I'd like to add a field that ***igns a unique number to my results. Should I be looking at sequences? Or is there an easier way to do it?
<14> how do i restore only ONE database from a mysqldump that contains many databases?
<15> pixie magic
<16> anybody can check what's the problem :S http://202.125.141.11/astguiclient/astguiclient_web/admin.php
<2> vega-, http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
<17> build a temp db and then delete all other dbs
<16> tamp4x: you are talking to me?
<17> no
<14> beebum: read that, it doesn't answer my question afaik
<18> I use INSERT IGNORE to add data to a table with a unique index
<18> if successful, I can get the last_inserted_id
<18> if not, is there any way to do it without SELECT?
<19> if it wasn't successful, last_insert_id is of little use...
<18> or the best way is to make the select first and then the insert? that would make 2 searches?
<19> you might be able to kluge something together with INSERT ... ON DUPLICATE KEY UPDATE ... and set some field to itself, or update a timestamp or something of that nature.
<19> !m a_me insert
<20> a_me: (INSERT Syntax) : http://dev.mysql.com/doc/mysql/en/INSERT.html
<9> vega-: I use vim, search for CREATE DATABASE and delete the database chunks I don't need,
<18> let me check it otu
<21> I want to do a select accross 2 tables where i select all rows in table one that do not have ***ociated ids in table 2?
<22> hey all is is possible to do a where clause on an aggregate? For example select sum(x) as y where y ='0'
<21> anybody know the proper syntax



<2> jakehow, i have just that at http://tyson.homeunix.org/notes/mysql.html
<2> vega-, sorry, i misunderstood what you were looking for
<23> is there any way to combine an INSERT and UPDATE into 1 statement? (ie: not having to check for an existing value first)
<24> REPLACE INTO
<25> how to I specify empty SELECT id, category WHERE subcategory = "" ORDER BY category ASC, id ASC
<25> "" don't work
<23> mlehrer: tnx
<26> replace into will clobber your auto_increment if you have one
<26> so beware
<2> Brian_S, sounds like you want where subcategory is null
<23> i'll read the docs and decide after that, tnx for the pointers :)
<26> jink: you could also use INSERT .. ON DUPLICATE KEY UPDATE
<25> beebum, how do I write that
<23> i'll look into that, too. (i'm using a table for userprefs, which has a primary key (id), a unique key (uid, prefname), and a column for the value)
<25> SELECT id, category WHERE subcategory is null ORDER BY category ASC, id ASC
<18> infi: ON DUPLICATE KEY UPDATE id=id
<18> I get 2 Records affected
<2> Brian_S, yes, i believe that's right
<18> one for insert and one for update, right?
<25> beebum I get this error
<25> #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE subcategory = null ORDER BY category ASC, id ASC' at line
<19> a_me: using ON DUPLICATE KEY UPDATE has a surprising return value. Check the comments at the bottom of the INSERT page where I made notes about the return values. (Jason McManus)
<2> where sub is null
<19> a_me: the INSERT syntax web page, that is.
<2> not =
<25> I tried with is, get the same erro
<25> #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE subcategory is null ORDER BY category ASC, id ASC' at lin
<18> got it
<2> Brian_S, remove the order by and try again to narrow it down
<18> I guess it's ok
<18> only if it's faster than SELECT and INSERT
<25> its the is null
<19> a_me: it is, you only have to prepare one query.
<19> I tested it last year sometime
<18> yes, but it would write to db on duplicate entries
<2> Brian_S, what version are you using?
<25> 4.3
<19> it's still faster than 2 queries, and it allows you to get the last_insert_id ..
<2> hrm, is null works for me on 4.1 :-/
<27> can anyone recommend a GUI relation designer -- right now my boss is doing everything by hand and I'd like something that when we're done designing the db will give us a SQL schema, rather than forcing me to type up the changes for each revision
<28> jcw9: dbdesigner or mysql workbench
<27> thank you
<19> is there a way to tell exactly what the optimizer will do to a query? as in, would "UPDATE foo SET col=col WHERE col=7;" be roughly optimized away as a NOP?
<28> i dont think you can run explain on anything but a SELECT
<28> mysql will not write any data if it sees that you are not actually modifying a row in a DML
<28> however i do not know if this is already done inside the planner
<19> hmm
<19> I suppose that query would end up at a minimum checking if matching rows existed, in order to return a useful rows affected value.
<28> rows affected for this query would always be 0
<19> er, right, rows matched.
<28> yeah
<19> nice, thank you.
<23> mlehrer, shabbs: i used INSERT INTO `userprefs` (`uid`, `name`, `value`) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE `value`=VALUES(`value`) tnx :)
<24> excellent
<29> I used "SET P***WORD FOR 'root'@'localhost.localdomain' = P***WORD('p***wd');" to set the root p***wd, so now, how would one -change- the p***wd? Would it be sufficient merely to reissue the same command with a new p***word or would the old p***wd still work?
<29> anybody know?
<2> kroisis, did you flush privs?
<29> beebum, I'm talking about for the future...is flushing required prior to initializing the new p***wd?
<2> wait, no. when using SET P***WORD, it flushes
<2> only with update do you have to issue a seperate flush
<29> beebum, yeah, Iw as just looking over that exact section in the manual,...thanks though ;)
<2> ;)
<29> so my guess is merely reinssuing the command with a new p/w should effectively -change- the p***wd and therefore the older p/w would no longer be valid...
<2> right, flush makes the new active and removes the old
<29> I don't EVEn know what the heck I meant by "reinssuing", probabbly "re-issue"...
<29> :(
<2> heh
<29> after typing for 35 years, you'd think my fingers would know how to do it, but Nooooooooo...(heh)
<2> lol
<2> using update would change the file only. a seperate flush would then change what
<2> s in memory
<2> heh, see i do it too ;-?
<29> thanks for making me feel better lol
<30> can I order by another table's field?


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

yhg1s __doc__
theoco
marco13185
#perl
avast QMAILQUEUE
#php
m0no maple
libxcalibrate
#lgp
#linux



Home  |  disclaimer  |  contact  |  submit quotes