| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Comments:
<0> ok thanks <0> mom... <1> multi_io: Does your query put multiple queries in with a ';'? <2> multi query is fine if you validate properly <3> yeah, but what value does it provide? <2> what error do you get multi_io <3> query overhead isn't that great <1> sjrussel: It is if you're doing a _huge_ "batch", but you're right, not a big deal for most folks <4> i think it is rather stupid if the query browser can't call stored procedures when it can help your creating and manageing them :P <3> batch? <0> the query is something like SELECT ... FROM sendlog s, sendlog_receiver_customers sc WHERE s.id=sc.sendlog_id and .... <2> rjdave : INSERT INTO table (field1,field2,field3) SELECT field2,field5,field10 FROM table2; <3> like, repeating the same query? <3> use a prepared statement <3> faster safer cleaner <0> mm-mysql: no, no multiple queries
<1> sjrussel: Actually, prepared statements aren't always faster. <5> Jeewhizz: won't I get an error since field1 will be null and it's part of the primary key? <1> And in any case the JDBC driver "hides" complexity like that from you, so you can use prepared statements too. <0> the error is "Table 'dbname.s' doesn't exist" <2> it will insert a value so long as you have auto-increment set <1> (I prefer them exclusively except for some particular situations) <2> multi_io - well then it prob doesn't exist <0> Jeewhizz: didi you read the query I posted? <0> MySQL version is 4.0.23 <1> multi_io: Why are you not using "JOIN USING ... ON" <1> (it's cleaner syntax, and usually removes mistakes that crop up if you try and join by "hand") <5> Jeewhizz: it is not an autoincrement field I want to put the same string "ROMS2004" for every row from the old table. <0> hm, it seems I forgot the AS <2> ah, you are better off using a script then rjdave <0> SELECT ... FROM sendlog AS s, ... <2> :) <5> Jeewhizz: alright, thanks. <0> mm-mysql: I'll look that up, thanks <6> Hi <6> this lists all the lastnames in my user db that exist multiple times: SELECT lastname FROM users GROUP BY lastname HAVING COUNT(lastname) > 1; <6> Now how can the data of users with such a lastname? <0> no, it doesn'T work with AS either :-( <6> I was told to use a JOIN, but i don't know how to join the users table with that query <0> isn't the AS in SELECT ... FROM sendlog AS s, ... MANDATORY in MySQL 5.x? <6> I meant, how can i get the data of users with such a lastname appearing multiple times? <0> (if you want to refer to the table in the WHERE clause= <0> ronino: ... HAVING lastname='whatever' AND COUNT(lastname) > 1; ? <0> or I misunderstood you <6> multi_io: I guess so, i mean not with a specific lastname, but a lastname that appears multiple times <7> ronino: what version of mysql? <6> infi: 4.1 <7> SELECT * FROM users WHERE lastname IN (SELECT lastname FROM users GROUP BY lastname HAVING COUNT(lastname) > 1); <6> multi_io: like you want to get all users that also have relatives with the same name in the db <7> (don't use select *, though). <6> infi: hehe, i tried that query, but i canceled it after some time because it didn't return ;-) <7> how many records? <6> infi: 1800 <6> the query is still running ;-) <7> a bit too high for me to test here. <6> infi: it finished: 431 rows in set (3 min 1.01 sec) <6> infi: not a that good performance ;-) <7> do you use indices? <6> infi: i knew there was something... ;-) <6> infi: i now created an index on lastname and run the query again <0> is it possible to turn off any ' "preprocessing" of things' in the mysql client? <6> infi: execution time decreased to 1 min <7> ronino: http://dev.mysql.com/doc/refman/5.0/en/optimizing-subqueries.html <7> er <7> http://dev.mysql.com/doc/refman/4.1/en/optimizing-subqueries.html <8> ronino: you added an index on lastname? <6> Jive: yes i didd <7> it appears that HAVING is unoptimized. <9> Why does this return NULL? <9> select within(PointFromText('POINT((1.5,1.5))'), PolygonFromText('POLYGON((1 1, 1 2, 2 1, 1 1))')); <10> and what, you want to join all the rows from the users table that have duplicate last names to another table? <6> Jivedue: i want to get all users that have a lastname that appears multiple times <0> mm-mysql: it possible to turn off any ' "preprocessing" of things' in the mysql client? <10> ronino: do you have a unique id column? <6> Jivedue: yes, userId <6> Jivedue: but i'm not sure what to do with it, cause 2 users with the same name have different ids of course <10> ronino: try this: SELECT u1.userId FROM (users u1 LEFT JOIN users u2 ON u1.lastname = u2.lastname AND u1.userId <> u2.userId) GROUP BY u1.userId
<10> actually make it 'INNER JOIN' <11> ronino: or this: SELECT u.* FROM users u JOIN (SELECT lastname FROM users GROUP BY lastname HAVING COUNT(lastname) > 1) v1 ON u.lastname=v1.lastname; <12> hello. is there anyone who can help me fix my b2evolution mysql tables? <12> i get an sql error when i enter the query <10> Xgc: ahhh, my competiton is back ;) <13> do ORDER BY and LIMIT clauses affect all SELECT's in a UNION? <10> if you put it at the end <11> Daveman: Not exactly. <11> Daveman: (SELECT ...) UNION (SELECT ...) ORDER BY ... LIMIT; If you place it there it impacts the entire result set. <11> Daveman: But you need to use that form. <0> could it be that the only way to use multiple tables in a SELECT query and refer to them in the WHERE clause in MySQL 4.x is SELECT t1,t2 FROM .... where t1.x=... t2.y=... ? <10> ronino: you try either of those suggestions yet? <11> ronino: If the time is still bad with that query, you probably still have an index issue. <14> I have a website that's hooked up with Mysql... as week speak Mysql is eating up alot of CPU even there's no users logged in to the site - how could this be? <11> or just a slow system. <10> no kidding, with 1800 records, this shouldn't take more than a second <0> ....and could it further be the case that the only way to do that in MySQL 5.x is SELECT t1 AS a, t2 AS b ... WHERE a.x=... ... <0> ...and thus MySQL 4.x and 5.x are mutually incompatible ?? <3> himmelstrutzen - probably InnoDB is doing work in the background <12> "Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP," <12> anyone here know about b2evo? <14> sjrusses: ok, is that something that it does by default every week, day? <15> what's the default p***word of the mysql zip for windows? <15> I mean mysql itself <3> I think it depends on activity <15> but from the zip <0> (I meant SELECT ... FROM t1 AS a, t2 AS b ) <3> check for alot of disk activity <15> I downloaded mysql as a zip for windows <15> but I want to login into mysql using: mysql -u localhost -p root <15> but then it asks for a p***word <15> what should I fill in? <15> root doesn't work <7> where did you come up with that command? <7> mysql -u root -p <10> ronino: dude, did you fall off the face of the planet? <7> Jivedue: his C=64 is still calculating last names. <10> wth <15> infi: lol that one is the same :) <7> JD-Multi: press enter <15> aah <15> thanks infi :) <7> yup <16> da da DA <17> that dude is so not james bond <18> yah <18> I am <17> you'd probably be better than that guy! :D <19> is there something similar for MySQL 4.1 like 5.0+'s INFORMATION_SCHEMA.COLUMNS table? all I need is CHARACTER_MAXIMUM_LENGTH <6> Xgc: thx, i'll try that! <20> Hi all! I have a question: I have a .sql file sitting on my hard drive, it's the database from a PHPBB I co-administrate. I've opened it in textpad, but is there a windows 32 GUI that will allow me to open it, similar to MS Access? <10> ronino: SELECT u1.userId FROM (users u1 INNER JOIN users u2 ON u1.lastname = u2.lastname AND u1.userId <> u2.userId) GROUP BY u1.userId <10> try that too <17> Micheru: it's just sql statements, you'd need a server to parse it and make sense out of it <21> Micheru: You could load it into a temporary database and view it in phpMyAdmin <20> Okay, thanks.. hmm. <6> Jivedue: awesome, 441 rows in set (0.05 sec) with your last suggestion <10> ronino: k good, like I said, there's no reason it should take any longer than a second <22> how can i dump some data into file using a sql query? if tyhere isn't a way doing with it tell me that there isnt <6> Jivedue: yeah, cool, i didn't know that i can put a join after from inside (...) <23> is there a way to save a form that has filled in values? like. save the page WITH the filled in values <10> ronino: it's just joining the table to itself, where the last names are the same, but the userIds are different, then GROUP BY the u1.userId so that there are no duplicates <10> jessecrouch: is this about m <10> oops <10> jessecrouch: is this about MySQL or about HTML? <24> is there like a ~/.mysql file where i can set my pager <24> for the mysql client <21> your pager? O_o <24> in the client i always type: \P less <25> dancor: It should respect $PAGER in the environment <25> I'm not positive if it does but it should :) <24> heh let me check that <24> hmm nope
Return to
#mysql or Go to some related
logs:
#gimp #web #perl PERM_FAILURE: SMTP Error (state 9): 554 Relay access denied #perl #ai recompiling qmail on plesk #perl dpkg reconf xorg What is beagleindex
|
|