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

Channels


#mysql

19 October 2007


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

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

02:46 <****> voxia, i dunno... i don't have blobs
02:46 <****> hehe
02:47 <****> like a table with a unique id, the pri_id and the sec_id, and then replace my pri_id and sec_id with the unique id on my main table
02:47 <****> Hi :-)
02:47 <****> ?
02:48 <****> if I want to replicate a new db, what do I have to do on the slave? it appears not to be enough to just add the entry in my.cnf... do I need to create the database and import the schema on the slace before replication will work?
02:49 <****> MySQL 4.1.20 - "select max(bug_when), bug_id, added from temp_activity where bug_id = 40496 group by bug_id;" is not giving me the results I expect. It looks like the group by is limiting data before the max() function can be called. What's the best way to rewrite this query so I get what I am looking for - the largest bug_when row grouped by bug id?
02:51 <****> I can't put an order by in first because MySQL doesn't allow you to specify order by before group by...
02:53 <****> Which 'added' do you want?
02:53 <****> oh
02:53 <****> The one associated with max
02:53 <****> seekwill: 'added' is the activity log entry that was added.
02:54 <****> In this case - status change to 'RESOLVED' and 'CLOSED'...
02:54 <****> hmmm
02:55 * TruPilot considers creating a temp table inserting rows in reverse bug_when order to solve this.
02:55 <****> (not a great way but it might work)
02:55 <****> Derived table
02:56 * seekwill needs to go... good luck
02:56 <****> Thanks seekwill
02:56 <****> nite :-)
02:57 <****> That worked :-)
03:01 <****> :/
03:12 <****> ok, so left and right and inner on a join specify which rows are included right?
03:15 <****> prakriti, that's one way of summarizing it, yes.
03:18 <****> I've been totally enlightened.
03:19 <****> I have been using implicit inner joins for like 5 years, but never new the power of other joins.
03:19 <****> s/new/knew/g
03:20 <****> prakriti: That's just the beginning.
03:21 <****> of what?
03:21 <****> lol
03:21 <****> know anything I should read up on?
03:21 <****> prakriti: SQL understanding.
03:22 <****> heh
03:22 <****> prakriti: It's very common for professionals in the field to spend years without a basic level of understanding.
03:22 <****> Don't feel alone.
03:23 <****> Meh, I would say I had at least a basic understanding.
03:24 * prakriti hides his wounded pride.
03:25 <****> prakriti: Except the basic understanding of joins. Sorry. I wasn't trying to attack you personally. It's just a very very common situation in business.
03:26 <****> Heh, no worries. I'm just playing around.
03:26 <****> hello everybody! I'd like to know how to change the bin-log location on a live database.
03:26 <****> prakriti: The light is beginning to shine. You'll probably have much more fun from now on.
03:27 <****> prakriti: I have two words for yuo to try next: "derived table"
03:29 <****> eetfunk: See datadir.
03:30 <****> Xgc: ok, but can I do it while the database is running? that's my problem :(
03:30 <****> eetfunk: Also see log-bin.
03:30 <****> eetfunk: No. That's unlikely.
03:31 <****> oh
03:31 <****> i've done that
03:31 <****> alot actually
03:31 <****> prakriti: Done what? Show a simple example.
03:31 <****> If you have time, that is.
03:31 <****> a simple example?
03:32 <****> prakriti: Sorry. Were you responding to me with "I've done that. Alot actually."
03:33 <****> select a.phoo, d.blah from mytable a, (select something from somewhere ) as d where a.id = d.id;
03:33 <****> thats basically how I have used derived tables in the past
03:33 <****> again using , implying an inner join
03:33 <****> prakriti: Nice. Now do that in the context of the JOIN / ON form.
03:34 <****> i've done zillions of inner joins, just didn't know it :)
03:34 <****> prakriti: Good start.
03:34 <****> prakriti: Do you now understand the outer joins as well?
03:35 <****> I *think* with an outer join you get all rows regarless of wether they match the other table
03:36 <****> I am just assuming, knowing what a left/right/inner join is
03:36 <****> prakriti: Roughly. LEFT and RIGHT refer to outer joins.
03:36 <****> so outer does BOTH am i correct?
03:37 <****> prakriti: There's also FULL OUTER JOIN.
03:37 <****> oh ok, so LEFT JOIN is short for LEFT OUTER JOIN
03:37 <****> prakriti: Correct.
03:37 <****> and FULL OUTER JOIN is what I was describing as both LEFT and right
03:37 <****> prakriti: The outer joins are LEFT, RIGHT and FULL
03:37 <****> Hello people
03:37 <****> prakriti: Correct.
03:37 <****> like ftp keeps track of who has logged in, does mysql do the same?
03:37 <****> is there an inverse inner join?
03:38 <****> in logs
03:38 <****> yes.. that would be weird
03:38 <****> I need to check if someone has logged in to mysql .. remotely
03:39 <****> prakriti: Yes. It's the FULl OUTER JOIN ... WHERE t1.id IS NULL OR t2.id IS NULL;
03:39 <****> oh
03:40 <****> here is a beautiful page explaining it
03:40 <****> LEFT JOIN gets the left tables rows plus the common rows
03:40 <****> LEFT OUTER JOIN gets teh left tables rows WITHOUT the common rows
03:40 <****> OUTER JOIN gets all the uncommon rows
03:40 <****> INNER JOIN gets the common rows
03:40 <****> prakriti: No.
03:41 <****> ok.. well.. then they are lying to me :(
03:41 <****> people like to do that
03:41 <****> prakriti: You have a bad page or are misunderstanding what it says.
03:41 <****> outer keyword is optional, and there is always, left right or full, no outer by itself
03:41 <****> heh
03:41 <****> this page is bogus
03:41 <****> prakriti: The standard does not agree with that page.
03:41 <****> all the comments are telling this guy he is wrong
03:42 * prakriti closes the tab
03:42 <****> hehehe
03:42 <****> heh
03:42 <****> prakriti: Well he may be describing a database that does not conform to the standard.
03:43 <****> prakriti: None of the databases you're heard of would behave as he described.
03:43 <****> 2) on running \s a few times, I stop receiving the line ( Threads: 2 Questions: 349899 Slow queries: 3 Opens: 480 Flush tables: 1 Open tables: 466 Queries per second avg: 122.001 ) which comes at the end. Anyway to see it?
03:44 <****> the self join looks interesting
03:45 <****> prakriti: Useful. Just think of each table in a FROM clause as different. There's no need for them to refer to different base tables.


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

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo