@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<0> then your script is spastic, id has nothing to do with it SELECT * will get all the rows
<1> ... and people wonder why so many computers are compromsied
<2> i dont use select all, because i split the list in 3 columns dynamically so to speak
<1> has nothing to do with it
<1> actually your question has absolutely nothing to do with SQL
<1> so learn whichever language you're trying to use the data in
<2> php and mysql
<1> and don't put ANYTHING on the net untill you get a clue
<2> my sql part is wrong
<2> i discovered
<1> no, your logic is
<2> but dont know the fix
<3> just a question... when I have to store something like an author's name, or an article title, is it better to use varchar or char?
<1> ferner: I'm sure the manual will enlighten you about the differences
<1> school holidays somewhere or something?
<3> I have read it, but I am looking for a more specific tutorial on choosing the right data type for each column; http://dev.mysql.com/doc/refman/4.1/en/choosing-types.html



<3> was not enough
<1> http://dev.mysql.com/doc/refman/4.1/en/storage-requirements.html
<1> read the whole of the manual before returning
<1> OK TNX M8
<0> ferner use varcahr
<3> I have read that page, but how could that help me in choosing if I should use varchar or char to save an article title?
<0> its less painfull than hours of bitching aboutr reading the manual
<1> if you have a clue what you're doing you would know
<1> if not, you shouldn't be putting anything online untill you get a clue
<1> Eldritch: not really
<1> long term perspective, spoonfeeding increases the workload
<3> I was using varchar, and in the pages I have read there were many discussion of people choosing one over another; I needed to know how expert MySql developers choose them, and this is something that I cannot find on any manual
<0> i disagree :-)
<3> I already know tha CHAR type has a fixed length, and hence takes more space but is also faster
<1> only becuase you're not cynical enough to be objective
<0> if he took the advise and left, i would be here typeing this crap, - time saved
<1> ferner: how many rows are we talking anyways?
<2> ferner, how important is it to know
<1> Eldritch: if it comes to that a ban is easier..
<1> it would depend on a magnitue of factors, for any grand system you would benchmark it
<3> I know how many bytes are needed for the most important data types; I just wanted expert people's opinion about it, possibly to understand why one should choose one over another
<1> but how many rows is it?
<1> couple million?
<1> tens?
<3> hehe no
<1> ?
<3> just 34,000
<1> in which case use a varchar anyways
<0> 99.9999% of the things people come here for it will make **** all diff between char and varchar
<1> 34k rows isn't really anything at all
<3> I know sorry, I am not a professional like you, and that is why I asked...
<3> to me writing something to handle a few thousands of records is already something, but I know that for people here and MySql capabilities it is nothing
<1> mysql> SELECT count(*) FROM domains_full;
<1> | 51268278 |
<3> woah...
<1> got it down from the 118M rows it was initially
<1> got a little faster..
<3> how much does it take a simple select on that table?
<3> for example, to find a domain with a certain name?
<1> depends on your definition of a simple select
<1> and how it gets to utilize indexes
<1> http://www.kfwebs.net/articles/article/37/An-analysis-of-the-COM-Top-Level-Domain
<1> one of the things I used the database for anyways
<3> oh I see... my stuff is nowhere close to this complexity! Haha!
<3> I understand you must be really annoyed by people asking what I asked
<1> but as for your question
<1> mysql> SELECT LEFT(domain,2) AS n, COUNT(*) AS c FROM domains_full GROUP BY n ORDER BY c DESC LIMIT 20;
<1> 20 rows in set (2 hours 40 min 18.29 sec)
<3> oh wow
<1> GROUP BY is mostly the culprit
<1> but the whole running a function on every row as well
<1> mysql> SELECT COUNT(*) FROM domains_full WHERE domain LIKE 'computer%';
<1> 1 row in set (6.77 sec)
<1> when it gets to utilize indexes properly
<1> however
<3> oh I see
<1> mysql> SELECT COUNT(*) FROM domains_full WHERE domain LIKE '%***%';
<1> 1 row in set (2 hours 28 min 26.84 sec)
<1> notice the difference in the wildcards there



<1> when it gets to use an index and when it doesn't
<3> oh yes
<1> but you want a VARCHAR anyways
<4> is it safe to say "use varchar when storage is more criticle than speed"?
<3> I read so
<4> for my databases, neither storage nor speed is criticle. ;p
<3> hehe
<4> i did do a query about a month ago that took more than 6 min
<1> hehe
<3> K_F, those stats are interesting to read
<1> remember the one I had that ran for some days, beebum ?
<1> ferner: thank you
<1> http://www.kfwebs.net/news/517/Nintendo-Wii-and-domain-name-registrations
<1> newest addition
<4> yes ;)
<3> sigh, I desperately wanted a nice wii domain name, but the day it was announced I had a visit at the hospital
<3> I came back home, and all I could think was already taken
<3> I wanted to start a revolution website with some friends
<4> i'll sell you tyson.homeunix.org ;D
<1> hehe
<3> eheheh
<4> hey, don't laugh. my blog make $1.50 for K_F. hehe
<4> it's #1 on the unix webring too ;)
<1> hehe
<3> :))
<4> i think i'm #1 on the ring because it's so fun to break in to my site
<3> hahaha
<3> Thanks for all the help, and sorry again! I never took too much time to think about which data type was actually better for each field, so now I find myself with a database to be fully optimized; I used int(11) for all IDs, and now I can't even remotely remember why... was it a random length?
<1> been some time since I got 37 GB of "**** YOU" ICMPs
<1> random to the extent that it would never be more than 10 anyways
<3> amazing
<3> ...
<3> well I have a lot to read and to do
<3> thanks a lot, again!
<5> narf
<4> JC^Omega, i told you, it's "SNARF"
<5> it's not snarf
<5> it's NARF
<5> you cottin pickin son of a monkey's uncle
<4> it's SNARF QUEST
<4> lol
<1> NAF is the only remote thing that makes sense
<1> Norwegian Automobile Forbund (***embly)
<5> narf - nerds are ready freddy
<4> heh
<1> except when I'm not
<5> lol
<5> the only time I miss you honey is when I'm alone or when I'm with some body
<5> your memory never even get's to mee sept when i'm awake n when I'm sleepin
<5> girl you never even cross my mind sept just when I start to thinking that your fallin behind
<5> only when I laugh, only when I cry, and only on days that end in y ie ie ieieeiii
<4> JC^Omega, uncle, uncle
<5> damn strait uncle
<4> heh, it's not even friday yet and we've already lost it :(
<5> it's my friday
<5> weekend starts on thursday
<4> what's a weekend?
<5> weekend is the time between thursday and monday
<5> that get's spent on drinkin
<5> bangin hoes
<5> lil more drinkin
<5> and a whole bunch of sleepin
<4> doesn't ring a bell
<5> throw in a couple lynchin's
<4> i thought you were a scout master or something
<5> I am
<5> Venture Crew Leader
<4> well then straiten up
<5> but that's like being in the reserves
<5> one weekend a month
<5> two weeks a year
<4> integrity is 24/7


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#linux
#teens
#linuxhelp
#php
#squid
Don Quixote's imaginary love
#linux
#linuxhelp
#php
SDL_GL_LoadLibrary



Home  |  disclaimer  |  contact  |  submit quotes