@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19



Comments:

<sjrussel> if you're going to do any selects, making the PK something that is organized for your primary select would be a *very good* thing
<sjrussel> as opposed to a random rowID
<Davey|Work> when using UNION, how the heck am I getting different results for LIMIT 0,10 then LIMIT 10,10 (i.e. two seperate queries, I'm paging) than with LIMIT 0,20 ?
<alphablue> which would not be a good thing
<sjrussel> Davey|Work, consistently?
<Davey|Work> sjrussel, yes
<Davey|Work> sjrussel, the difference I see, is that the first SELECT of the UNION doesn't return any results on the second page
<sjrussel> oh, in a UNION?
<Davey|Work> yes
<HarrisonF> are you sure that the LIMIT is being applied to the overall query and not the second query only?
<Davey|Work> yup
<GhettoJava> is there anything I can tweak to make a 3 table left join (with and OR clause run faster?)
<HarrisonF> what is the query exactly?
<Coach-Z> I'll certainly be doing selects where the primary key is in the WHERE clause. Is this what you mean by "organized for your primary select?"
<sjrussel> kindof
<GhettoJava> Busy in here today
<Davey|Work> you had to ask... hehe
<sjrussel> if you did selects by categoryID, for example, putting categoryID in the PK would be really good
<Davey|Work> http://hashphp.org/pastebin?pid=6472 - you probably would prefer some formatting, right?
<sjrussel> rows near each other in the PK are near each other on disk
<sjrussel> so much faster to read
<GhettoJava> my "explain" is http://rafb.net/paste/results/O3IUVu37.html
<Davey|Work> http://hashphp.org/pastebin?pid=6473 - there formatting
<Coach-Z> sjrussell: It sounds like you're talking about a composite key
<Coach-Z> A PK made of multiple columns?
<sjrussel> could be
<sjrussel> in that case
<sjrussel> Davey|Work, that is the ugliest thing I've seen in a long time
<Davey|Work> sjrussel, why thank you :)
<Davey|Work> I'm proud of it! :D
<HarrisonF> put paratheses around the queries, so you get (select...) UNION (select....) ORDER BY ... LIMIT
<sjrussel> does changing the values of constant columns in UNION work now?
<Coach-Z> I've got two columns I'd like to index. One has is the PK and the other has no unique constraint, I just want to index on it. Both bigints
<sjrussel> 997, 998, etc
<sjrussel> that didn' youse to work
<Davey|Work> HarrisonF, that's going to be a little hard
<HarrisonF> whys that?
<Davey|Work> HarrisonF, because I don't feel like hacking the generation code to add it, but I will if there isn't any other way
<alphablue> heh, sjrussel: shows what I know, i was like wtf is 997 ?
<HarrisonF> trying doing it manually to see if it helps first
<sjrussel> apparently, it's 'sort_col' ;)
<Davey|Work> good idea :)
<alphablue> so noob question: SELECT DISTINCT c . * , 997 AS sort_col
<HarrisonF> and it is easy to add to auto-code generators, you just have it do ") union distinct (" and then ( and ) ;)
<alphablue> what exactly is it doing ?
<alphablue> just returning the value 997 for a colum called sort_col ?
<sjrussel> you'll get all the rows, then... 997
<sjrussel> yeah
<sjrussel> nice for reformatting data & such
<sjrussel> but ... it used to be that the UNION threw away the values after the first time
<alphablue> how is it "reformatting" anything ?
<Davey|Work> HarrisonF, OK, that does work, but *why* ? :)
<alphablue> ahh
<enygma> pixie magic
<enygma> s/pixie/pudding
<Davey|Work> enygma, do you have like a trigger on my nick? you follow me all over the place :P
<alphablue> dust mites inside your server
<Davey|Work> and you only speak when I do :P
<enygma> moi? never!
<alphablue> restraining order time
<sjrussel> Davey|Work, perhaps you only read when talking?
<snoyes> are those dust mites user friendly?
<alphablue> i want to switch roles with my cat
<enygma> user roles or real life roles?
<enygma> because im not sure I want a cat in here
<sjrussel> top/bottom
<alphablue> life roles.. he sleeps all day
<alphablue> lol
<alphablue> not top/bottom
<alphablue> never needing to hunt for food
<enygma> kinky
<enygma> Davey likes side/side
<alphablue> i'm just not that well endowed
<birdfish> Should I be using version 4.1 or 5 when trying to use authentication with apache2.2?
<birdfish> I'm also running FreeBSD 6.0
<alphablue> it doesn't matter ?
<alphablue> the mod_auth_db should work with whatever
<birdfish> Okay, cool. I just saw that there was a special mod_auth_mysql41_ap2-1.00 for version 4.1 and didn't know whether I could use the regular mod_auth_mysql-2.20_7 or not
<sjrussel> DaveyWork: I (guess) that mysql retrieves the rows for the separate queries in parallel on separate threads
<sjrussel> and that () sequentializes them
<sjrussel> are there fewer than 20 rows the first query?
<alphablue> BODMAS!
<alphablue> but for sql
<ineffable> hi, folks, I've got a problem even starting mysqld. I get the following error just running "mysqld_safe&" (this is what's in the error log) http://jtest.umecit.maine.edu/mysqerr.txt
<ineffable> running this on slackware 10.2. total mysql noob.
<alphablue> ineffable: did the server crash recently ?
<sjrussel> and .. that depending on the limit, mysql doesn't have to parse the second query ( limit < rows in table one, can just fetch fromt the first query??)
<ineffable> alphablue, the previous time I tried it it gave the same error and crashed. that's why it says it didn't shut down properly
<ineffable> this is all brand new installations, too
<alphablue> checked your permissions ?
<ineffable> running it as root
<alphablue> did you run mysql_install_db ?
<alphablue> i think slackware puts the db files in /usr/local/var/mysql ?
<ineffable> I did run mysql_install_db
<sjrussel> BODMAS?
<alphablue> and are the files owned by mysql:mysql ?
<ineffable> one sec, I'll check
<alphablue> sjrussel: old math trick i learnt in 4th grade.. order of operations acronym
<alphablue> i forgot BO, but it's like division multiplication, addition , subtraction
<alphablue> i think the B is for brackets, which are called parentheses in this country
<ineffable> alphablue, everything in /usr/local/mysql is owned by root
<alphablue> change it to mysql:mysql
<ineffable> should I then regenerate the db, too?
<alphablue> no
<ineffable> okay
<alphablue> if you've already done it, it's fine, mysql usually drops to mysql:mysql once it's started
<alphablue> not sure what the username/group combo is for slack tho
<ineffable> same error
<ineffable> maybe I need to change more permissions
<birdfish> sjrussel: PEMDAS :)
<alphablue> chown -R ?
<alphablue> pemdas ?
<ineffable> alphablue, of cousre
<sjrussel> same thing
<birdfish> Parenthases, Exponents, Multiplication, Division, Addition, Subtraction
<alphablue> ahh
<alphablue> but we were tuahgt division first.. wierd
<alphablue> or i'm not remembering it right
<sjrussel> they're parallel
<sjrussel> same with add/subtract
<birdfish> It doesn't matter which to use first
<birdfish> Damnit sjrussel
<birdfish> You keep writing faster
<birdfish> :P
<alphablue> ahh, no wonder i didn't take math as a major
<sjrussel> it's really PE(M|D)(A|S)
<ineffable> alphablue, looks like I just needed to change some more permissions elsewhere, because it's no longer crashing immediately. Thanks!
<HarrisonF> Davey|Work: order of operations, without the parathesis, it applys the LIMIT to the last query
<alphablue> i remember when i first came here, and said left bracket my teacher is like.. no you don't use brackets for this..
<rajesh> hey all. has anyone encountered an issue where the first access using jdbc results in java.sql.SQLException: Access denied for user ''@'localhost' (using p***word: NO); but all subsequent accesses work fine?
<mr_smith> hi Therion
<Therion> HELLO AGENT SMITH
<rajesh> it's just the first access that comes back with that exception.
<mr_smith> heh
<alphablue> rajesh: sounds like your code problem
<alphablue> not mysql
<rajesh> alphablue: yeah, it does, i agree.
<alphablue> as if the first time your code is not aware of the proper connect string
<rajesh> but was wondering if anyone faced it, and hence has an idea why.
<alphablue> without learning java, and then looking at your code.. no :)
<rajesh> yea, i checked that, but obviously i'm missing something more.
<rajesh> cool.
<rajesh> well, thanks anyway.
<rajesh> ltr.
<alphablue> paste your code, we can look
<alphablue> bye ?
<rajesh> alphablue: heh, it's a heck of a lot of code (it's not just a simple 4 lines to connect and exec)
<rajesh> :)


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

fc5 +screensaver config
centos raid tools
#web
linux sg setgroup
kenel panic not syncing vfs unable to mount root fs
#perl
#mysql
maddash irc
gentoo font deuglification
mysql mythconverg utf8



Home  |  disclaimer  |  contact  |  submit quotes