Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

04 November 2007


Total 16 pages. You are browsing page 5/16.

First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last

05:50 <****> blobaugh: .00004
05:51 * ericP reads back...
05:51 <****> duh
05:51 <****> true, shouldn't be that big of a hit
05:52 <****> kpdvx_: you aren't super wrong about corellated subq's being evil.
05:52 <****> chadmaynard: no im pretty sure im right. i ran them both in my head and that was the difference
05:53 <****> i generally try to avoid them- the same thing can generally be accomplished much more efficiently with well-formed joins
05:53 <****> blobaugh: i wouldn't argue with you
05:53 <****> kpdvx_: not always!
05:53 <****> heh, ive got a sweet union query
05:53 <****> blobaugh, ?
05:53 <****> hmm...where did i put it?
05:53 * blobaugh rummages through filesystem
05:54 <****> select 'chad maynard' as 'cool people' union select 'chad maynard again';
05:54 <****> blobaugh: was that it?
05:54 <****> ya, the wench knows who your really are ;)
05:54 * chadmaynard looks around and doesn't see the_wench
05:54 <****> no it was aligning and sorting parents under their children when there is an id and parent_id column
05:54 * blobaugh weeps over the missing wench
05:54 <****> why is she gone anywho?
05:55 <****> she is on vacation
05:55 <****> !tell blobaugh about the_wench
05:55 <****> Alrighty.
05:55 <****> gahh! my roommate is menacing me with most horrid booze
05:56 <****> wasabi liquor -- smells and tastes like vinal
05:56 <****> anyone utilize views often?
05:57 <****> http://rafb.net/p/tNBtcV46.html
05:57 <****> kpdvx_: blobaugh is an expert on views
05:57 <****> when did that happen?
05:57 * blobaugh looks around
05:58 <****> blobaugh, sweet, maybe you're familiar with this then...
05:58 <****> ...
05:58 * chadmaynard laughs
05:58 * blobaugh nick sucker
05:58 <****> i've got a large query-- 6 joins or so (though, not as large as the query that was just posted...)
05:59 <****> anyway, the select has a GROUP BY. when I run the select, it's super fast, even for 1000 rows or so. When I create a view from it, and run it, even doing running it selecting only one row, it can take minutes to run
05:59 <****> I'm having issues with my wordpress blog loading slowly. I deleted a few posts, and then afterwords everything loads slow. This happened a couple of weeks ago. MySQL error possibly?
05:59 <****> what, may query? it just looks scary. its really just two simple selects
05:59 <****> now, if i alter the view such that the GROUP BY is no longer present, it's damn super fast again
06:00 <****> idrew: check the slow query log
06:00 <****> blobaugh, i didnt look at your query really, just noted its length
06:00 <****> chadmaynard: Can you tell me where that's located?
06:00 <****> yeah, its just long because i have each column i want in the select on a new line
06:01 <****> idrew: if you ask that you probably havent enabled it.
06:01 <****> !m idrew slow query lo
06:01 <****> idrew: (The Slow Query Log) : http://dev.mysql.com/doc/mysql/en/slow-query-log.html
06:01 <****> Yeah, I'm looging at that page now.
06:01 <****> wow, g and k are pretty far apart
06:02 <****> "To enable the slow query log, start mysqld with the --log-slow-queries[=file_name] option. "
06:02 <****> ^ How do I do that?
06:02 <****> idrew: or put it in my.cnf
06:03 <****> blobaugh, for a while i assumed that GROUP BYs in views just couldnt be done. i'd run the select on it and mysql would just sit. the other day i kept it running in the background... 9 or 10 minutes later it returned the resultset
06:04 <****> chadmaynard: I see a "my.ini", but not "my.cnf"
06:04 <****> idrew: windows?
06:04 <****> Chadmaynard: Yes
06:05 <****> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
06:05 <****> idrew: then that's it
06:05 <****> crap i have a liquid stain on my keyboard
06:05 <****> chadmaynard: Alright, but where exactly do I enable it at in there?
06:05 <****> i think i got it mostly rubbed of
06:05 <****> idrew: you see [mysqld] ?
06:06 <****> chadmaynard: Yes, it's under "server section" in the .ini
06:06 <****> liquid stains are no problem -- it's when they turn solid that they really stick
06:06 <****> anywhere in that section is fine. ( log-slow-queries = slow-queries.log )
06:06 <****> ew
06:07 <****> chadmaynard: So under [mysqld] just type in "log-slow-queries = slow-queries.log"?
06:07 <****> idrew: if you want to
06:08 <****> might want to specify a path- otherwise i think it'll go into the mysql bin dir
06:08 <****> Hasn't showed up anywhere yet.
06:09 <****> kpdvx_: im googling right now and im not finding any reason why it should slow down
06:09 <****> idrew, restart mysql
06:09 <****> in windows, go to the services section in the control panel, in there somewhere should be mysql
06:09 <****> Okay, restarted.
06:09 <****> kpdvx_: how do you know he named it mysql?
06:10 <****> blobaugh, i couldn't find any reason either, but for some reason, it does it
06:10 <****> eh, it's probably mysql-nt or something
06:10 <****> kpdvx_: are you sure?
06:10 <****> not entirely, but i used to run mysql on windows
06:10 <****> Okay, it's restarted. What do I do now?
06:10 <****> hope it works
06:10 <****> kpdvx_: i have 10 instances on my laptop. how are they all called mysql?
06:11 <****> idrew: do whatever you are complaining about being slow
06:11 <****> then rad the query log
06:11 <****> read
06:11 <****> what OS? I'm unsure why they'd appear. threads?
06:11 <****> chadmaynard: Alright, that's what I'm doing now.
06:11 <****> i renamed my mysqld instance to psqld
06:12 <****> chadmaynard: Alright, nothing's showing up in the log.
06:12 <****> i have mysql pgsql and oracle on here
06:12 <****> heh
06:12 <****> idrew: too bad. Mustn't be a slow query
06:12 <****> :(
06:13 <****> Anything else I can try?
06:13 <****> idrew: how long exactly is slow?
06:13 <****> i have this query, select * from `char` where name like '%oom%' order by 'char_id' desc limit 1;
06:14 <****> i want to change it to make it display the latest row,if theres more than one result
06:14 <****> idrew: the query would need to take 10 seconds to appear in that log.
06:14 <****> chadmaynard: 13 seconds, compared to loading almost instantly.
06:14 <****> idrew: add set-variable = long_query_time = 3 under the line you just added and restart
06:15 <****> does anyone know how ?


Total 16 pages. You are browsing page 5/16.

First :: Prev :: [...] [3] [4] [5] [6] [7] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo