|
2005/7/26-28 [Computer/SW/Database] UID:38823 Activity:nil |
7/26 Hello SQL experts, I have two tables, A and B. A has 1/2 million rows and B has 2 million rows. The relationship is A.id=B.A_id. Whenever I have something like: SELECT A.id, AVG(B.val) FROM A,B WHERE A.date<'2008-01-01' AND A.id=B.A_id GROUP BY A.id; It takes about 20-30 seconds. Anyone know why? I've already indexed all the ids. \_ Do you have an index on A.date? \_ Yes I do. I found out something new. I did a SELECT COUNT(*) FROM ... <rest is the same here> and I got 63 million rows. I'm guessing something is really screwy here, do you have a clue? How about INNER JOIN, is that faster? How do I use it? \_ The syntax you gave is an inner join by default in most databases. In mysql or pgsql at least, try adding "explain" to the beginning of your select. This will tell you which keys it's trying to use, how many rows each step gets filtered down to, etc. --dbushong \_ Hello I'm the op. I've reduced my problem to the following. Say I have 4 tables, A, B, C, and D. When I do a SELECT COUNT(*) and I join A and B, it is pretty fast. When I join A, B, and C, it is twice as slow. And when I join all of them, it is FOUR times as slow. I've made sure that all the joint columns are INDEXed. Why is this happening? \_ You're specifying 3 join conditions, right? You have non-unique indexes on the foreign keys and unique primary keys? \_ Thanks Dave. Basically, column A.id is unique, column B.id is not unique. A.id maps to B.id. Similarly, C.id is not not unique, but also maps to B.id. Is this the reason? I need a one to many mapping and I don't know how to get around it. \_ if you're using mysql, mysql can only use one index per table. if you're joining on multiple columns, that could be your problem |
2005/7/26 [Reference/Religion] UID:38824 Activity:nil |
7/25 I have a novel approach to finding and getting rid of suicide bombers, please tell me what you think, and if it's doable. You [government] hire a bunch of patriotic Muslims to recruit people who are anti-government and want to blow themselves up. You give them backbacks filled with dud-bombs that do nothing but give off smoke. You then arrest them while they are smoking in the vicinity of a lot of people. What do you think? \_ That's nice here you can have a cookie before naptime. \_ patriotic muslims == infidel \_ That's similar to how we trick drug dealers. |
2005/7/26 [Computer/SW/Security] UID:38825 Activity:high |
7/26 Doing the jobs American's won't do... Mexican accused of leading document-fraud ring - Millions of phony IDs for illegal aliens http://www.freerepublic.com/focus/f-news/1450601/posts \_ Yay, freeper is back! --freeper #1 fan \_ And Freeper doesn't know how use an apostrophe! What a dolt. \_ Nice way to duck the issue raised with a weak personal attack. I don't read freeperlinks or like freeperguy but you're making yourself look more stupid than freeperguy. Either respond intelligently, putting him in his place, or ignore it if you have nothing worth saying. \_ What's the issue to duck? Freeperguy hates immigrants. This has been long established. There really isn't much to do except make fun of him. <<<<<<< /home/sgi/dcs/tms \_ I'm not ducking anything. I didn't even read the article, sounds boring. He didn't even make a point. ======= \_ You haven't made fun of him. You've made yourself look petty, stupid, and childish, assuming it was you getting personal above. Just ignore it. Why can't you see you're only encouraging it? \_ FWIW, I wasn't the one making fun of freeperguy's grammatical problems. --pp \_ And he's getting incredibly good at hiding his identity >>>>>>> /etc/motd.public |
2005/7/26-27 [Academia/GradSchool] UID:38826 Activity:nil |
7/26 Spam filtering for grad students: http://www.phdcomics.com/comics/comics.php |
2005/7/26 [Transportation/PublicTransit] UID:38827 Activity:kinda low |
7/26 Spare the Air Day. \_ So claimed the crazy Microsoft bicycle guy standing on the caltrain platform. Fuck you crazy MS bicycle guy, maybe if you stopped yelling about how people bungee their bikes you'd have some credibility. -- bought a ticket, proud to support caltrain \_ Caltrain rules, BART drools. |
2005/7/26 [Politics/Foreign/Asia, Politics/Foreign/Asia/Others] UID:38828 Activity:moderate |
7/26 So rich Korean/Chinese/Taiwanese/Singapore single lonely dude all mail orders pretty Vietnamese girls, what about Vietnamese dude?? What the hell do they do? ;) \_ Mail-order from Laos? \_ Please don't lump Singapore with males chauvinist countries like USA, China, Korea, Taiwan, Japan, etc. Singapore doesn't have a sex ratio problem: at birth: 1.08 male(s)/female under 15 years: 1.07 male(s)/female 15-64 years: 0.95 male(s)/female 65 years and over: 0.79 male(s)/female total population: 0.96 male(s)/female (2005 est.) \_ Many boys die while growing up? \_ that's the same everywhere. go check at: http://www.indexmundi.com -> country -> people -> sex ratio \_ Men have higher mortality for a bunch of reasons, military service, more likely to be involved in violent crime, more likely to take stupid risks for fun, etc etc. \_ more likely to write on the motd |
2005/7/26-27 [Science/Space, Politics/Foreign/MiddleEast/Israel] UID:38829 Activity:nil |
7/26 So what do ppl think re: NASA? 1) Stick with shuttle program? 2) Scrap the shuttle, move to the next type of launch vehicle 3) We should build a moon base 4) Manned-Mars Ho! 5) IIS - make it an orbital station for whatever launch vehicle we choose for (2). \_ Can't do #3 or #4 without #2. #1 is stupid. Therefore, #2. \_ Agreed. -mice \_ We have to go ask our asian lenders for more lunch money because we already spent our allowance for the next 5 centuries on the Iraq invasion. \_ Nah -- we just allocate some of that money for starting a war with our debtors, then after bombing them back into the Third Age, we rebuild their country with Americanized values and declare them either the 51st state, or a 'Protectorate' with symbolic representation in the senate. \_ Scrap NASA and start over, imo. This gold-plating and closed competition between Lockheed and Boeing has to stop. -- ilyas \- A nice line I heard was "pentagon procurement is one of the last bastions of stalinism". where in russia are you from? \_ Odessa. Interestingly, Odessa is considered the 'city of humor' in Russia. It was a largely jewish city, and there is a 'certain culture' to it. It's a lot like a russian version of San Francisco, I would say. -- ilyas \_ here's some pics: http://www.sergeyv.com --!ilyas \_ So let me get this right. You're not a Jew, but you're almost a Jew because of exposure with Jews? If that's the case, I will start respecting you a bit. -not a jew but totally worship them \_ I am not russian either. I have no nation. You would be interested to know that during the formation of the state of Israel, they considered anybody who considered themselves a Jew to be a Jew (for the purposes of immigration). -- ilyas \_ In other words, you too can be a Jew, Jew worshipper guy! |
2005/7/26-29 [Transportation/Car, Transportation/Car/RoadHogs] UID:38830 Activity:high |
7/26 To the free market troll complaining about how the government shouldn't fund an R&D project into better roads. Have you any idea how many commercial(read: free market) companies owe their technology to basic science funded by the government? Hell. If not for that, you wouldn't even have a career. \_ I am probably the guy you think is the free market troll. You didn't read my posts carefully enough. I totally support government funding of R&D of all kinds, government funding of roads, and government funding of public mass transit. I just loathe car culture, and think that our present system is not based on either a free market or government support of rational transit, but rather is based on whoring out the country for the car companies and suburban developers. You may address me as "anti-car troll" if you want to be accurate. \_ "whoring out the country for the car companies..."? Did you just graduate from highschool? That's the sort of demagoguery I'd expect from a freshman or sophomore with all the accompanying idealisitic 'Im gonna change the *world*!!!!' demagoguery I'd expect from a freshman or sophomore will all the accompanying idealisitic 'Im-a gonna change the *world*!!!!' zeal. \_ I'm not lafe but I just want to say that when I was in college I was full of optimism and energy because I felt that I could do a lot to make this world better. Now that I'm in my 30s, working 9-5... I feel that there isn't much I can really do to drastically change the world. You just live life the way life wants you to live. Does anyone feel similar? \_ Not at all; I'm not a victim. -pp \_ No. Try to be a good guy, debate eloquently, stand by your convictions. What's so hard about that? Make what little difference you can, and enjoy watching the morons around you send the world to hell in a handbasket. And regarding the comment below, Europe has good public transit, but the cities are also generally a lot more densely populated. -John \_ I do try to live my life modestly and reasonably, but I've concluded that the world doesn't want to be made better. See GC's comments on "Paradox of Our Time" http://www.georgecarlin.com/home/dontblame.html \_ So, your alternative to car culture...? \_ See Europe. Walkable/bikable cities, subsidized mass transit. High gas taxes to discourage use of the automobile. Discourage sprawl. \_ Europe's big cities are very densely populated. The rest of Europe uses cars just like here. \_ Even smaller European cities have very usable public transportation (better than, say, SF/Oak). And even less densly populated regions are well served by public transport. I was able to get from the door of my apartment to standing on a glacier (in another country no less!) solely though public transport (well, and some walking). \_ So you suggest a *massive* rebuilding of our entire culture where we literally rip up everything now in place, and rebuild everyone's home, work, the transit system, utilities, everything, so you don't have to live in car culture? Seriously, I've never said this to anyone before but if you're that upset you should just move to another country that suits you better. Living here will just keep you bitter and angry. Note, I don't say 'make'. You are already bitter and angry to a ridiculous degree over something that will *never* be anything like the way you want. \_ Ok, take a couple of deep breaths and re-read my post. You will see that I do not suggest anything; I just offered a counter statement and supporting anecdote to the post before me. Physician, heal thyself. -- pp \_ Ok, so you advocate nothing when the original point of this sub-thread was "What is your alternative to car culture?". To say that you advocate nothing when you're really advocating European style transit which would require a massive and near complete rebuilding of society is pure intellectual dishonesty. To then turn around and say the fault is mine and that you're this calm and together person while I'm some nut case is pure dishonesty. Care to actually discuss the issue instead of nutting around? \_ I predict that within 10 years gasoline will be $10/gallon and the rebulding of America into a denser and more sustainable fashion will begin happening all on its own. And yes, you are the one that sounds angry and bitter and extreme here. !-pp \_ It isn't possible to be angry/bitter about something I don't care about. Questioning someone who questions the status quo is hardly extreme. Now you're just being silly. Re-read and try again. I predict that whatever happens, if you predict enough random things you'll eventually be right about some of them. \_ Are you familiar with the Peak Oil hypothesis? I am not predicting a "random" thing, I am subscribing to a theory that already has quite a bit of evidence to back it up. \_ I've read a lot on both sides of the peak oil hypothesis. I'm still undecided. Thinking about it now, no, I don't think oil will ever get to $10/gallon in today's currency because there are other energy sources that cost less than that, but more than the current price. Oil can exceed those numbers due to current inertial reliance, but not to infinity and I don't believe to $10/g. I still remember all the scare movies in the 70s telling us how by the mid 80s the world would be completely out of oil. I'm not easily convinced that state of affairs is always ~10 years away. \_ A while ago I saw a seaman's handbook written in the 70's that quite sincerely stated that sail might well be comming back in the near future so merchant seamen should learn sailing related skills. \_ So I did some research and I agree that because of coal to gasoline processes, gas will probably not hit $10 anytime soon. I think $5 is very likely though. \_ I wouldn't say that smaller cities have better public transport than SF does. There is, for instance, no subway. You might be able to get on a bus, but you can do that here, too, if you don't mind a 3 hour trip to go 20 miles. My point was that Europe, outside of the dense cities, is also a car culture. Try driving from Paris to the Mediterranean during the summer. The roads are packed. Mostly the old and the poor use public transport, just like here, unless they live in a big city (like our NYC). Plenty of Europeans own cars and use them to, say, go to Wal-Mart. \_ Yeah, traffic here is horrible, as bad as LA -- I don't deny that (though the highways are also much narrower). But at the same time, of the 12 people I work with closely, every single one takes public transportation to work. of the 12 people I work with closely, not a single one drives to work. I live in a town that isn't that much larger than Des Moines and it has functioning public transportation. You are right, there is no subway here, but there are trams. However, to go 20 mi, I wouldn't use either -- I'd take a train and, if well timed, it should take about 40 minutes door-to-door with public transportation (less if I biked to the train station, which I probably would). It is un- realistic to expect the US to become this way overnight, and there are some inherent differences between Europe and the US that may make it hard to implement such a system, but the difference isn't just an "economy- of-scale" effect from large cities -- many smaller European cities have well functioning public transportation. \_ When I was on vacation, I took trains everywhere. The train from Nice to Paris took about seven hours. I could have done it in a bullet train in about four, but I wanted to do it overnight and get a sleeper. The people I shared my cabin with certainly were not poor. \_ Trains will get you to a city, but are not helpful to get you to a particular destination. I can fly from LA to SF for cheap, so I guess flying is better than public transportation. Why would someone take a train to Nice if they could fly? \_ Easy -- it takes an hour to get from your house to the airport, where you need to arrive an hour in advance. The flight takes an hour, and it takes another hour to get from the airport to the city center. So, even though the flight is only 1 hr, you are in transit for 4 hours. When factoring in the time it takes to get to the train station, it probably takes a little bit longer, but the experience is much more pleasant. \_ The solution is obviously to build more airports so that it won't take 2 hours there/back. \_ Or more train stations with bullet trains. \_ You can take a cab or local transit or even rent a car once you get there. Flying is a sort of mass transit, actually. How is it fundamentally different than Greyhound?? \_ Same as in Hong Kong and around the Tokyo area. Many people have nice cars, but they don't drive them everyday. \_ In Tokyo, you don't have to. In NYC, you don't have to. It's unreasonable to expect the same level of public transit in, say, Des Moines. \_ I've never been to Tokyo, but the idea that you can get around NYC with just public transit is simply wrong. Even if you want to think that Manhattan = NYC, this still isn't so and the incredible number of cabs and other private driving services should make this clear. If public transit was so great and workable in NYC, there wouldn't be so many cabbies. A cab is *waaaay* more expensive than public transit, btw. \_ There are tons of cabbies in Tokyo, and Seoul as well. Seoul has great public transit, but that doesn't mean you don't sometimes need a car, and therefore a cab. There are even some cases where a cab is cheaper than public transit. Quite a few in fact. -jrleek \_ Absolutely. I don't think many people are arguing for getting rid of all cars. Taking public transit for an IKEA shopping trip is probably impractical, and there are plenty of remote regions that don't need to be served by public transit. The aim of car alternatives should not be to replace cars in all situations, just common ones (people don't go on IKEA shopping sprees every day, people do go to work every day). \_ in other countries ikea provides very good delivery service for big items. for small items, just call a cab. still don't need car. \_ I have been to NYC dozens of times and have never taken a cab. The transit system does everything I have ever wanted it to do in NYC. Have you ever even been there before? \_ yes, i was born and raised there. how many times did you visit our fine city? \_ dozens. I don't know the exact number. \_ Someone needs to ilyas this post. \_ To verbify is the American way... urr, I mean it's to Americanize. \_ I think that guy didn't have a problem with government funding R&D projects in general. He only had a problem with funding R&D projects into better roads. an way... urr, I mean it's to Americanize. \_ I think that guy didn't have a problem with government funding R&D projects in general. He only had a problem with funding R&D projects into better roads. |
2005/7/26-28 [Computer/HW/IO] UID:38831 Activity:nil |
7/27 anyone want to sell me a used kinesis keyboard? email me - danh |
2005/7/26-8/19 [Computer/SW/Unix, Computer/HW/Drives] UID:38832 Activity:nil |
7/26 Root will be moving office home directories to the new file server this Friday, and soda home directories this Saturday. Expect downtime, I've gotta rsync off of TDA: the slowest disk on the face of the earth. - jvarga \_ Home dir move postponed pending some serious issues with keg and new soda. - jvarga \_ Home dir move complete. |
2005/7/26-28 [Academia/Berkeley/CSUA, Academia/Berkeley/CSUA/Motd] UID:38833 Activity:moderate 57%like:38555 53%like:38796 |
7/26 More administrativa including upcoming downtime. Read the official motd you hozers. - jvarga \_ jvarga et al -- what sorts of booze? I'd be glad to donate some cash for a discretionary entertainment fund for our hardworking rootish adminy volunteer people.... -mice \_ I dunno. I don't drink alcohol at all, and njh is going to be out of town. Chances are that I will be making these changes in my underwear from the comfort of my home. - jvarga \_ You shouldn't request booze if you don't want any. Your punishment to drink the vodka in the filing cabinet! ... No, I guess being the CSUA sysadmin is punishment enough... :P \_ I usually request booze to make the rest of root easier to work with. - jvarga \_ Back in my day, we just used the bat for that. When twohey wasn't busy using it on his project partners, that is... \_ I think the last time root types assembled with alcohol, we had wine. Perhaps a dessert wine, like a port. \_ fag. \_ I don't get it. What would you prefer? \_ I think ya do, Trebek! I think ya do! \_ Buckfutter!!1! \_ It's a joke, son. \_ jvarga - are you going to be in Berkeley next tuesday afternoon? I'd like to thank you (and give you a donation for the csua) in person. --ranga \_ I get out of classes at 4pm, after which I'll likely be in the office slamming my head against things after the home dir move. - jvarga \_ stalker alert! \_ ranga I'm poor, can you please treat me to Fondue Fred tomorrow? -poor student \_ poor student: so presumably you have some free time and talent to donate. do do anything for the CSUA or are talent to donate. do you do anything for the CSUA or are you just a leech? \_ he's a poor student precisely because he has no free time and/or talent with which to make money. \_ I'm a poor student because I spend all my time doing stuff for the CSUA rather than getting a real job. - jvarga \_ Any idea when /ftp will be up again? Thx. |
2005/7/26-28 [Computer/HW/Drives] UID:38834 Activity:nil |
7/26 What is the maxium hard disk size with LBA48? Where can I find a LBA48 spec? I've looked everywhere. \_ The upper limit to LBA48 is somewhere on the order of 144 petabytes, or 144000 million gigs. In other words, there's no need to every worry about geometry sized limitations according to the spec. \_ No one will ever need more than 64k of RAM. \_ Well, actually, you might be right. The complete archived internet contains about 1 Petabyte of data, so on a simple linear extrapolation an LBA48 drive that contains a 144 petabyte drive the would run out of disk space in about 150 years. I'm not quite sure if the web is expanding or not or if that expansion is linear or geometric, I would assume the latter, so it may only last for say 25 years. \_ If we're talking about the same thing, it's 2^37 bytes, AKA 128GiB aka 137GB. \_ No, you're wrong. |
2005/7/26-29 [Consumer/Camera, Computer/HW/Laptop] UID:38835 Activity:low |
7/26 What are the pros and cons of Compact Flash versus Secure Digital for a camera? \_ Please add to the list: Pro for CF: 1. harder to break physically 2. harder to lose Pro for SD: 1. smaller form factor \_ You can get a Firewire CF reader from Lexar and SanDisk but afaik no one makes a FW SD card reader. I've tried a FW and a USB2 CF reader and the FW reader is noticably faster. \- my understanding is cameras are moving in the direction of SD but it seems to me there isnt much of a choice today, meaning you can choose whether to get the same body with CF or SD. and i wouldnt think not having SD is a reason to rule out a body or somethign especially important to wait for [as might be a full size sensor etc. with somethign that small, who cares about size [assuming it is a decent sized camera]. \_ Really? A friend who knows pro photographers said that SD isn't taken seriously because it's too fragile. It's thin isn't taken seriously because it's too fragile. It's small and the "pins" are exposed. On the other hand, perhaps amateur photography has moved toward SD; PDAs certainly have. \_ There are loads of multi-card readers (CF, SD, Memory Stick, etc) around. I have one, I can look up the maker if you want. -John \- the author of http://tinyurl.com/8s9ky made the claim about moving CF -> SD. i find this peculiar ... i'd think it would be easier to make say a 8gb card in the CF form factor than SD, and i think people want space and speed over saving 1oz. anyway, just passing along a claim. \_ Is one or the other more reliable/longer lasting? \_ As above mentioned, size is a key factor. I think for consumer digicams, SD is the way to go. Last I checked, CF was still quite a bit faster than SD. If that's still the case, CF definitely belongs in prosumer and upper level cameras. Oh, and another advantage for CF is that it's just a PCMCIA on a smaller form. So compatibility with laptops(with pcmcia adapter) will be better. \_ new laptops and pcs seems to have card readers built in. |
2005/7/26-28 [Computer/SW/Mail] UID:38836 Activity:nil |
7/26 What's a graphical mail reader for unix that lets me specify multiple SMTP servers for sending email? For instance for GMAIL i want to use <DEAD>smtp.gmail.com<DEAD> . for work I want to use <DEAD>smtp.work.com<DEAD> . I can sort of do it in Thunderbird if I manually change the SMTP server every time I send mail from certain locations. - danh \_ Mozilla. Under Mail & Newsgroup settings -> SMTP Servers -> Advanced. Probably Tbird as well. -John |
2005/7/26-27 [Recreation/Humor, Academia/GradSchool] UID:38838 Activity:nil |
7/26 Was it a Douglas Adams book that had an offhand joke about the Committee For The Study Of The Exceedingly Obvious? http://www.thedartmouth.com/article.php?aid=2005071201040 |
2005/7/26-31 [Computer/SW/OS/OsX] UID:38839 Activity:nil |
7/26 My wife uses NJStar on Windoze, but is thinking of changing to the Mac;however, entering text in traditional chinese is a pain. Is there an input method for OS X that is similar to that used by NJStar? tia. \_ yes. OSX comes w/ builtin language support for typing chinese. i know you can do the pinyin method of input. i'm know there are others. \_ thx for the reply. the default input method seemed very slow and painful on my G5 in comparison to NJStar on windows using pinyin. However, using the translation feature from simple to traditional wasn't too awful, though, we couldn't do the whole document at once. Any plugins that are faster and/or more intuitive than the defaults? TIA. \_ i only know of the defaults. the input seems relatively speedy to me. NJStar is definitely more polished, but i haven't had any problems inputing chinese (1.5G of RAM). you might try http://www.yale.edu/chinesemac to see if they have any more details. \_ thx. saw this site before, but didn't have a clue to which plugin might be good. I think we may get her mac this weekend. :-) \_ I use a Tablet PC to write Chinese. Nothing is more nature than writing Chinese and having it converted with over 99% recognition rate. It's amazing. \_ way cool! |
12/23 |