| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Comments:
<0> Darien: thanks, checking <0> hm.. I run mysql as a service <1> What worries me most is the slow performance of the join <1> I don't know if it can be avoided or just optimized and I'm doing it wrong <2> MetaMorfoziS: the problem was that the subselects would execute once for *every row in your result. Instead of 1 query, you were running 1+(N*2) queries and they were scanning the same table over and over again. <2> omgs: please paste the explain plan like I asked earlier <1> inviso_: what do you need that I didn't paste? <3> Guys I've got an annoying problem. I've got a stored procedure with a concat, prepare and execute in it. However, although it returns fine in cmd line it gives completely garbled data in PHP/PDO. <2> omgs: EXPLAIN your_query; <1> I'm afraid I don't understand <2> !m omgs explain <4> omgs: (EXPLAIN Syntax (Get Information About a SELECT)) : http://dev.mysql.com/doc/mysql/en/EXPLAIN.html <1> But, what query? <2> omgs: the one you don't like perhaps? <2> or a really quick one if you like. I presume the slow one would be more helpful <5> inviso_: okay, but it limits the output only 2
<6> anyone know why all my tables (in 4.1 on debian sarge) are being created latin1_swedish_ci, and I can't change more than half of them to utf8_unicode_ci? <1> I'm not talking about queries I don't like, just the one that I might be doing wrong <5> so i had two posts that hat reply field not 0 <5> and the other's isn't liste <5> d <2> MetaMorfoziS: then LEFT JOIN? <2> MetaMorfoziS: didn't realize reply wasn't required <5> hoh <2> omgs: so that one then? <5> okeay i rewrited <5> LEFT OUTER <5> it work <5> btw thisis alinking between the post <5> one post replies to other, and when i'm list i need to write "reply to nick msg" <5> so, it works, and thank you. <2> MetaMorfoziS: np, time to rewrite the other subselect :) <5> yes <5> :D <5> i'm working on it <7> I cant get php to work with mysql >_>, Im trying to install phpmyadmin, it always sayds this: <7> Cannot load mysql extension. Please check your PHP configuration <8> did you compile php with mysql support? (check phpinfo(); ) <7> phpinfo works, it displays version in purple etc. <1> inviso_: I'd like first to try to find why the table isn't being populated <1> Or if the tables can be set in a better way <8> Riyonuk yeah but the topmost field, contains the ./configure string <8> check if --with-mysql is in there somewhere <8> Riyonuk something like --with-mysql=/usr/lib/mysql <7> 207.235.116.168 <7> my phpinfo <2> omgs: hehe, you expected me to read that whole post if I didn't have to? ;o) Reading back through it now <9> heya peeps :D <8> yeah you didn't compile with mysql Riyonuk <10> is SQL not the bot? <7> how do i do that <0> I'm getting an error "Can't find messagefile 'C:\Program Files\mysql\share\english\errmsg.sys'" but I have mysql installed in C:\Program Files\MySQL\MySQL Server 4.1, how can I tell it the right path? <8> well maybe you want to install one of those all in one packages Riyonuk for windows <8> apache, php, mysql <7> never, i want to learn <8> well you should install it on linux then :) <8> you can google for 'windows php apache mysql' <7> gave up on that, so anyways whats --with-mysql=/usr/lib/mysql <8> well, I don't think you can compile on windows to well ... but you would normally configure with that mysql option enabled and the path to the mysql libs <8> not sure how to do that on windows, since you normally install binaries i think <2> omgs: ok, the mismatch on rows may well come from the DISTINCT on your insert at line 25. And honestly, I'd go about it differently anyway. I'll add to your post the basic steps I would take instead <7> so mysql doesnt work on windows? <5> inviso_: http://sql.pastebin.com/652352 :( <5> please check <8> Riyonuk sure it does <8> check the mysql installation documentation on how to setup on windows <8> !man Riyonuk installation <4> Nothing found. <8> die SQL <7> Well what guide should I use, as they all dont seem to good <11> Riyonuk: it sure does. Install XAMPP, if you don't want to deal with the nitty gritty. <7> I do though <8> Riyonuk: http://dev.mysql.com/doc/refman/5.0/en/windows-installation.html <11> Riyonuk: Apache + PHP + MySQL + PHPMyAdmin + Perl, all ready to go. <5> www.xampp.org ?:) <2> MetaMorfoziS: looks like your joins are in the wrong order <7> I wont learn if I do that
<5> order!? it's important? <5> okay i try <2> yes, order is typically important ;o) <5> hm <7> Jax: what on the table of contents do I read? <5> i putted the second to first <5> not <0> Darien: I tried that, and I'm getting an error "Can't find messagefile 'C:\Program Files\mysql\share\english\errmsg.sys'" but I have mysql installed in C:\Program Files\MySQL\MySQL Server 4.1, how can I tell it the right path? <5> i putted the last to first <5> it work <1> inviso_: I don't think so, because that select is for populating the source table, which is done ok <5> so 321 <5> but where i need to knowwhat is the good order? <5> for example if i has 40joins? <5> ihas 40^2 combinations:) <1> The difference is just a few records (buggy from my point of view, but not important at this point) <8> Riyonuk top down, all ;) <2> MetaMorfoziS: You need to read up on joins and really try to understand what they are doing... <7> ahh <7> *aww <5> okay, rtfm:) <5> thank you:) <7> but what should I do as someone mentioned I didnt compile or somethingn <5> ALL, eq_ref, ref, eq_ref <5> congratulations:) <5> before ALL, ref,eq_ref,ref <5> :) <0> hm, let's try again: I'm using mysql, myodbc and ado on windows, how can I get some debug information, e.g. record all sql queries sent to the server? <8> (23:55:26) (Riyonuk) I wont learn if I do that <8> (23:58:34) (Riyonuk) *aww <8> contradiction! <8> :D <5> :D <12> aditsu, Write it into your app? <12> Or <12> !m aditsu general query log <5> he comes to here if he isn't udnerstand anything:) <4> aditsu: (The General Query Log) : http://dev.mysql.com/doc/mysql/en/Query_log.html <5> not understand it:) <13> Is there any way to do a "tail-like" select? (e.g. limit -5, return the last 5 rows instead of first 5) <5> hackel <5> limit <12> !m hackel select <4> hackel: (SELECT Syntax) : http://dev.mysql.com/doc/mysql/en/SELECT.html <5> LIMIT from,how-many <0> will_: the thing is.. the final query is built by the ado or odbc system, and I can't see it <0> will_: I tried that (query log), and I'm getting an error "Can't find messagefile 'C:\Program Files\mysql\share\english\errmsg.sys'" but I have mysql installed in C:\Program Files\MySQL\MySQL Server 4.1, how can I tell it the right path? <12> aditsu, See if the general query log logs SELECTs... <13> MetaMorfoziS: The manual does NOT show a way to do this that I could find. <12> I don't know... <12> hackel, You could try it... <5> SELECT lines FROM foo ORDER BY time DESC limit 0,5 <5> it show for you the last 5lines <5> read about limit <12> One of those things, that if it's possible, it's listed in the manual. <13> MetaMorfoziS: I didn't think about reversing the order, which isn't really what I want but is good enough. It know about how to use limit! <0> sigh.. <2> MetaMorfoziS: I can't take the time to explain how join order influences execution or why you have to have a table joined already that you need to join against later in the query. It's something you'll get a feel for or simply read up on <13> MetaMorfoziS: So thank you, just don't ***ume I haven't already RTFM. :-P <5> inviso_ i udnerstand, i said for me rtfm:) <12> MetaMorfoziS, So how do I select the last 5 records, but have them in ASC order? <2> hackel: there is no "last 5" rows without an order of some sort. No order is implicit. Use ORDER BY and reverse the order <5> order by bar asc <5> the limit limits the results <5> from, how-many <12> SELECT * FROM table ORDER BY id; <-- I want the last 5 records but in ASC order... <5> the how-many sets how-many lines lised <12> MetaMorfoziS, How would I do it??? :( <5> what columni you need order? <5> (my english grammar is ****:)) <12> id <5> SELECT * FROM yourtable ORDER BY id ASC/DESC limit 0,5 <12> huh? <5> it show only five lines
Return to
#mysql or Go to some related
logs:
emaint is not a valid atom putty cannot open your terminal #web #debian t oomkiller limits #php #linux ubuntu libssh kubuntu
|
|