#mysql
31 October 2007
Total 29 pages. You are browsing page 1/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Wed Oct 31 00:00:01 2007
--- Day changed Wed Oct 31 2007
00:00 <****> flexo: v1 contains the aggregate MAX() data. t2 contains the non-aggregate information.
00:00 <****> oh right.
00:00 <****> sorry, the transition from the single table to multi-table got me Really confused
00:00 <****> flexo: It can be confusing at first.
00:01 <****> how can i change the max execution time in mysql ?
00:01 <****> what max?
00:01 <****> dkr, i get this wne runnig source on mysql
00:01 <****>
00:01 <****>' at line 1
00:02 <****> sorry spamm
00:02 <****> uhm, so you have a syntax error. fix it
00:02 <****> opss
00:02 <****> :(
00:03 <****> got it :(
00:03 <****> that other error was not from mysql, but from the cgi
00:03 <****> wheni exported php write the error
00:03 <****> Hm, my first select seems to be wrong.
00:03 <****> select "Hello World!"; ?
00:03 * dkr smirks
00:04 <****> heh :)
00:04 <****> http://paste2.org/p/8890
00:05 <****> http://paste2.org/p/8890 pls help me =( , why isn't it giving me the first union first and then the second union?
00:05 <****> flexo: Each select should be independently testable.
00:06 <****> unbeatabl: That's not guaranteed behavior. If you need specific ordering, use an ORDER BY.
00:06 <****> is there an easy way to return which of two values isnt another? like right now im using: IF (a = 282, b, IF (b = 282, a, NULL))
00:06 <****> but it seems excessive
00:07 <****> i do have it
00:07 <****> I suppose I could make sure one of them contains 282, then just do one IF
00:07 <****> unbeatabl: No. Yuo don't.
00:07 <****> then where do i place it
00:07 <****> the order by
00:07 <****> unbeatabl: You need ordering in the outer most select to guarantee your result order.
00:08 <****> unbeatabl: (select ... ) union (select ...) ORDER BY field;
00:10 <****> alright, is there a good way to test if either of two variables are equal to same value?
00:12 <****> tetsu: a=b
00:13 <****> tetsu: FIELD(282, a, b)
00:13 <****> How can I take the column values stored in a MYSQL_ROW object and turn them into a std::string ?
00:13 <****> tetsu: Returns 1 if a, 2 if b, else 0.
00:14 <****> ls
00:15 <****> xgc, I'm a little confused. In the very upper SELECT if I put t2.* it gives me all the info I need. However, if I instead specify with such things like t2.nid, it doesn't seem to pick them up. Am I referring to them incorrectly?
00:15 <****> tetsu: ELT(FIELD(282, a, b)+1, null, b, a)
00:16 <****> lol
00:16 <****> alright ill do it with a boring OR
00:16 <****> tetsu: You don't like this? That's exactly what you asked for.
00:16 <****> I know
00:16 <****> its more complicated than I hoped
00:16 <****> cool functions though
00:17 <****> It also probably scales much better than the cascaded ifs.
00:18 <****> But I'd have to verify that.
00:19 <****> xgc: that doesnt work
00:20 <****> unbeatabl: Define doesn't work. The form is fine.
00:20 <****> it still doesnt apend, second unionset to the first one
00:20 <****> unbeatabl: What version of MySQL are you using?
00:21 <****> mysql 5.022
00:21 <****> basically, i want my second unionset appended to bottom of my first unionset
00:21 <****> unbeatabl: Well, you need to provide proper ordering. Just adding ORDER BY stupid_field; isn't sufficient.
00:22 <****> right now i have (select * from bla WHERE ....) union (select * from bla WHERE .....) order by ID
00:22 <****> unbeatabl: (select 1 nset, blah, ... ) union (select 2 nset, blah, ...) ORDER BY nset, blah;
00:22 <****> i want the second unionset appended to bottom of my first unionset
00:22 <****> unbeatabl: (select 1 nset, id, ... ) union (select 2 nset, id, ...) ORDER BY nset, id;
00:23 <****> what is select 1 nset
00:23 <****> nset ?
00:23 <****> unbeatabl: Derived column.
00:23 <****> hmm interesting
00:23 <****> unbeatabl: (select 1 AS nset, id, ... ) union (select 2 AS nset, id, ...) ORDER BY nset, id;
00:23 <****> If that makes it clearer.
00:24 <****> would union all work
00:24 <****> He could use union all, but his basic problem has nothing to do with that.
00:24 <****> incredible
00:24 <****> thank you xgc!
00:24 <****> unbeatabl: You're welcome.
00:25 <****> anyone here familliar with innodb caching ?
00:25 <****> is there a block_cache and a query cache ?
00:25 <****> and if that's right is there a way to monitor or control the block_cache ?
00:25 <****> query cache works on mysql level, nothing to do with innodb
00:26 <****> innodb has a bufferpool to cache the tablespace
00:26 <****> ok
00:26 <****> hmmm....
00:27 <****> when you say tablespace, you mean caching entire tables or x rows from a table ?
00:27 <****> we have some queries in our system that suddenly got very slow
00:28 <****> and it seems like there is alot of IO going on which wasnt happenning before
00:28 <****> tablespace is where innodb store the data/index on disk, bufferpool is a cache for tablespace
00:28 <****> the server has 10 gig of ram, and the table in question is only 2 gigs in size
00:28 <****> what is the bufferpool size?
00:28 <****> i mean server has 16gig, mysql cache is set to 10 gig
00:28 <****> what mysql cache? there are various buffers and caches
00:29 <****> you mean key buffer?
00:29 <****> 16 gigs damn
00:30 <****> hope your running freebsd
00:30 <****> checking kimseaong, one sec... thanks for the help as well.
00:30 <****> btw, was my sql query too big?
00:31 <****> strange i cant find the mysql.conf
00:31 <****> maybe cause its not named that lol
00:31 <****> nkbreau: my.cnf
00:31 <****> doh
00:33 <****> kimseong: what should i be lokin for in my.cnf for that setting ?
00:33 <****> innodb_buffer_pool_size=10000M
00:34 <****> that must be the one...
Total 29 pages. You are browsing page 1/29.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
