#mysql
15 November 2007
Total 10 pages. You are browsing page 4/10.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
03:19 <****> Not anything else.
03:19 <****> Would be nice if there was a general LAST_INSERT() function though.
03:19 <****> you don't have an auto incremented field?
03:19 <****> ldlework: it's not a good idea to use NOW() in an ID column.
03:19 <****> No I'm using "NOW() + 1"
03:19 <****> fine, NOW() + 1 is still no good
03:19 <****> deadroot, I'm new to MySQL. Can you briefly explain why?
03:20 <****> what if two or three people creates a record at the same time?
03:20 <****> Okay, it will never happen in this system but I see what you're saying.
03:20 <****> I suppose AUTO INCREMENT is there for a reason.
03:20 <****> yup
03:21 <****> if you must have the date just add a timestamp field with default to current_timestamp
03:22 <****> the KISS principle also applies
03:22 <****> to solve original you could do greatest(idfield)
03:22 <****> i've got 8 available numbers. 1-8. Each player must have a unique number for their game, but they can choose whichver they want so long as it's available. How do I ensure that they get a unique number? .They can also change it at any time.
03:24 <****> put a status on the number and update the status as the the numbers are taken?
03:29 <****> What is the point of a Primary Key?
03:29 <****> Uniquely identify each row
03:30 <****> Isn't that what AUTO INCREMENT does?
03:31 <****> if I recall correctly, an auto_increment column must be the primary key
03:31 <****> prevents insertion of duplicates, tells mysql to keep a list to quickly find the row
03:31 <****> no. but usually you assign the property of auto increment to the primary key
03:32 <****> ldlework: you can have a primary key column which does not have auto_increment. "create table a (a int, primary key (a));"
03:33 <****> primary keys have a much bigger role when they are used in relationships. otherwise it's just an index (unless that is true about auto increments having to be on primary keys)
03:33 <****> It also seems it actually directs the engine how to store the records. If there is a primary key, lookup is much faster by the key by use of
03:34 <****> mysql tries its best to keep a list of primary keys in a buffer in memory. Using these are much faster than having to read the table to search the rows
03:34 <****> B-Trees
03:35 <****> well thats the same as any index
03:35 <****> ldlework: have you tried to test with unique keys or just plain indexes?
03:35 <****> oh, yeah. primary keys imply unique ones too.
03:35 <****> searching uniques is an order of magnitude faster than non uniques also
03:36 <****> re, sorry had an emergency. Let me backscroll Dauby
03:37 <****> so, any ideas for my problems?
03:37 <****> I guess I can make two select and compare arrays.
03:38 <****> I was hoping that MySQL had something builtin
03:38 <****> ionix, why must you compare them though?
03:38 <****> Hi
03:39 <****> I haven't done any testing
03:39 <****> I'm just theorizing at this point
03:39 <****> What the difference between a unique key and a plain index?
03:39 <****> I had alittle problem where my server was rm -rf / :( but! I found a 3gb sql file from september, looks to be a backup of every database from then. Anyone got any tips on how to check what db's are in the sql file? I know notepad cant open a 3gb sql lol!
03:40 <****> plain can have duplicates
03:40 <****> am i able to lock specific rows?
03:40 <****> cmanns, can you just import them into a test db?
03:41 <****> Dauby: I want to find missing strings from the table "strings" based on the ID in stringid
03:41 <****> cmanns: grep "USE " file.sql
03:41 <****> looner, you can but the db type cannot be myisam, use innodb
03:41 <****>?
03:41 <****> they are innodb
03:42 <****> cd '/mnt/coruscant/html/codebase/javelin/classes'
03:42 <****> Dauby, It'd take roughly 12hours to upload it to my server, and I don't got enough horses on this system to run mysqld its already slow.
03:42 <****> cmanns: wait you said "notepad"... you on windows?
03:42 <****> i'm trying to find where it explains row-level locking on the mysql site but it's sending me in circles
03:42 <****> ToeBee, yes :(
03:43 <****> cmanns, ToeBee has answer. if you are on windows. you can d/l grep for windows
03:43 <****> !m looner innodb
03:43 <****> looner: (The InnoDB Storage Engine) : http://dev.mysql.com/doc/mysql/en/innodb.html
03:43 <****> hmm good idea
03:43 <****> there is FIND in windows
03:44 <****> probably not as powerful as grep
03:45 <****> there's a windows version of grep somewhere
03:45 <****> well there is cygwin...
03:45 <****> yes there is, or try cygwin
03:45 <****> ionix, you may need to paste the details somewhere to view. sql is specifically built for the problem you are describing but I'm having a hard time conceptualizing it
03:46 <****> there is a grep without having to install cygwin server
03:46 <****> mks toolkit
03:47 <****> http://gnuwin32.sourceforge.net/packages.html
03:47 <****> cmanns: ^
03:47 <****> I just opened it in notepad++
03:47 <****> don't really wanna load this system with stuff its slow
03:47 <****> yeah but notepad will fail miserably searching on 3GB
03:48 <****> can it even open 3GB
03:48 <****> it's a commandline util. and i don't think notepad++ is much better
03:48 <****> grep is tool for this
03:48 <****> notepad will not open file greaterthan certain size
03:48 <****> kimseong: he's using notepad++. based on scite
03:49 <****> ok
03:49 <****> 3gb in buffer for notepad though
03:49 <****> or any editor
03:50 <****> windows--
03:50 <****> it's not so bad. it's just most of the users are normal people
03:51 <****> yes... it is that bad :)
03:53 <****> see the list of requested features for the next version of windows that leaked from MS today? Most of them have been around for 10+ years in other OSes
03:54 <****> because those features have to be gui'd up. making easy to use gui's with power programs sometimes takes longer than the making the power program
03:54 <****> penis
03:54 <****> yes
03:55 <****> penis
03:56 <****> mine hurts
03:56 <****> Dauby: disagree. "multiple concurrent logins" have been "possible" since XP but MS disables it unless you pay for it
03:56 <****> "tabs in browser" has been around since 2000. They JUST made it to IE
03:56 <****> steveie: probably because of your boys at Fordham uni.
03:57 <****> same with inline search
03:58 <****> ionix: ooooh ya got me... oh wait proxy
03:58 <****> true, ToeBee
03:58 <****> ToeBee: those features are only misindentified to be unimportant. if they had wanted to do so, it wouldn't take them that long
03:59 <****> hey all. there is a file that has the letter limit on a free text search. where is it?
04:00 <****> but if there were no linux and openbsd, we'd be paying through the nose for unix for that too
04:00 <****> deadroot: no. They are incapable of coming up with new ideas. When something becomes important enough they go out and buy it
04:01 <****> normal corporate hehe
04:01 <****> that and their ideas of what is "important" IS out of whack as you suggested. They prefer to spend effort locking users out of the system so that they can't steal bits instead of innovating
Total 10 pages. You are browsing page 4/10.
First :: Prev :: [...] [2] [3] [4] [5] [6] [...] :: Next :: Last
