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

Channels


#mysql

09 October 2007


Total 22 pages. You are browsing page 1/22.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Tue Oct 09 00:00:02 2007
00:00 <****> how would you set up the schema for a dictionary ? for example, the synonyms, I have them in a comma separated text column, should I instead use a different separate table with columns like: word_id, synonym_id ?
00:00 <****> meandrain: what exactly are you trying to achieve with that
00:00 <****> jbalint: make it work faster
00:00 <****> heh
00:00 <****> meandrain, more threads != faster.
00:01 <****> As I recall, the recommended number is about twice the number of CPU cores on the machine.
00:01 <****> if only it were true
00:01 <****> jbalint; can you give me a syntax example kindly :)
00:01 <****> somebody told me that he use 2048 threads on a machine with 4GB of RAM and is working well
00:01 <****> thanks snoyes
00:01 <****> meandrain, it's going to be slower than if he used, say, 8 threads.
00:01 <****> meandrain, unless he has more than about four cores. Say, a thousand.
00:01 <****> roler: select 1 from dual where exists (select 1);
00:01 <****> Then it would be faster.
00:01 <****> !m roler select
00:01 <****> roler see http://dev.mysql.com/doc/refman/5.0/en/select.html
00:01 <****> it's a sigle CPU, dual core
00:01 <****> jbalint; thank you so much
00:02 <****> roler: ok, sure
00:02 <****> meandrain, then use four threads.
00:02 <****> i see
00:03 <****> Or so. That it should be exactly four is something I Read On The Internet Somewhere(TM).
00:03 <****> But making it many times the number of cores will not speed up anything.
00:03 <****> The threads will just have to switch off more often, which will probably slow things down.
00:04 <****> jbalint; running "SELECT Str_Name,Str_Text FROM testimaging.strings WHERE EXISTS (SELECT Str_Name,Str_Text FROM testimaging.strings);" returns: "Table 'testimaging.strings' doesn't exist'...
00:04 <****> my problem is that mysql uses 80% of cpu and i am trying to make it lower
00:04 <****> meandrain, more thread probably mean more cpu usage..
00:04 <****> meandrain, make sure your queries are efficient.
00:04 <****> roler: thats not a syntax error. do you know SQL?
00:05 <****> meandrain, maintain a slow query log, run EXPLAIN, fix things so they use indexes and so on.
00:05 <****> meandrain, or if you want an easy out, check whether disk or CPU is the bottleneck, and buy better disks/CPUs.
00:06 <****> meandrain, you can post your config file for inspection. Generally things to look at are the sizes of certain caches. Tinkering with the number of threads probably won't help you.
00:06 <****> I'll analyse those queries
00:06 <****> jbalint; That's not, no. But what I was typing before was, hense my question. I suppose now my question has migrated into how to make it not give an ERROR.
00:06 <****> jbalint; if the table does not exist
00:06 <****> roler: well, you cant query an non-existing table
00:07 <****> roler: so thats inherently an error.
00:07 <****> jbalint; Isn't that what IF EXISTS is for? Such as Dropping a table? I guess I should have been more clear, but i'm trying to use if exists like when dropping a table. If it doesn't exist, I don't want an error
00:07 <****> roler: no, thats not what its for
00:08 <****> roler: you can query from the information_schema first, to see if said table exists
00:08 <****> I have just moved a text column "description" to another table and replaced with a key to that table. How can I get that field text description back in a single query on the original table? Some sort of nested query?
00:08 <****> hmm, pastebin.ca not working
00:09 <****> meandrain: rafb.net/paste
00:09 <****> pastebin.ca SUCKS
00:09 <****> BAD
00:09 <****> and causes me frustration when people use it :p
00:09 <****> shamrock, join?
00:10 <****> http://rafb.net/p/abvNmg52.html
00:10 <****> Simetrical: aha yes. I shall try google. thanks.
00:10 <****> i've tried with threads 8, still the same performance
00:11 <****> meandrain, yes, that setting won't greatly affect performance, as I said.
00:11 <****> http://rafb.net/p/FjijNC79.html
00:12 <****> meandrain, how much RAM do you have and what other programs are running on the machine? How much RAM can MySQL use, not counting disk cache?
00:12 <****> roler: you can query the information schema, select * from information_schema.tables \G
00:12 <****> roler: if you have a row that matches your table, then it exists
00:12 <****> meandrain, also, are your tables mainly MyISAM or InnoDB, or a mix?
00:13 <****> mix
00:13 <****> http://rafb.net/p/FYPPkN80.html this is from mytop
00:14 <****> avail memory = 2090565632 (1993 MB)
00:14 <****> Running only mysql, php and apache
00:15 <****> meandrain, you probably need to optimize your queries. The config file doesn't look glaringly wrong, although you might want to ask someone else too. So probably you're just running queries that aren't properly indexed, etc.
00:15 <****> Swap: 2011M Total, 148K Used, 2011M Free (swap not used, everything working in ram)
00:15 <****> i see
00:15 <****> But I'm not the most MySQL-savvy person here. You might want to ask for a different opinion.
00:16 <****> the database is 740 mb, this is not to big, i think
00:17 <****> No, it's not. Not especially small either, though.
00:17 <****> You're probably doing table scans for some queries, that sort of thing.
00:18 <****> How much worse would the performance of selects against a single column ( column="value") be with a table that had 10 million rows versus a table that had a thousand? how long would such a query take?
00:19 <****> heyadayo, essentially no difference if it's indexed. A millisecond or so, maybe.
00:20 <****> wow
00:20 <****> depends on how many returned rows
00:21 <****> Yes, I was assuming a single fairly short row is being returned.
00:21 <****> If it's lots of data, that will take longer to transmit.
00:21 <****> and on the cardinality of the (indexed) queried column
00:21 <****> Trengo, does it depend on that? If so, how? Not slower than logarithmically.
00:22 <****> I don't think slower than logarithmically, anyway.
00:22 <****> the bottleneck won't be the cpu/memory usage of the select though, rather it'll be on the bandwith to transmit the data... right?
00:22 <****> Simetrical no idea "how" but it does
00:22 <****> For hash indices it's constant, of course. I know btree is logarithmic on insert, what about on select?
00:22 <****> heyadayo, maybe. It all depends.
00:23 <****> evening all :)
00:23 <****> lets say I have two tables, couples and people, couples = id,surname and people = id,coupleid,firstname : there are 2 people per couple, what I want to be able to do is search by first name and see all the couple's a first name is involved with,would i be better having couples = id,surname,persona,personb or is there an easy way to search this
00:24 <****> Simetrical: could I trouble you to take alook at this? http://paste.uni.cc/17371 . I dont know best approach to combine the two.
00:24 <****> dom, I think you want: SELECT * FROM couples JOIN people ON (couples.id=people.coupleid) WHERE firstname='Bob';
00:25 <****> JOIN's eh, never tried them
00:26 <****> thanks i'll take a look into that :)
00:30 <****> Could anyone help with combing the two I pasted above?
00:41 <****> so, 4 hours later, and i still can't figure out how to get ssl working with the Java connector and my certificates
00:41 <****> anyone done this before?
00:42 <****> ssl+mysql?
00:42 <****> +java, yes
00:42 <****> i can get a mysql client connection to the server just fine
00:44 <****> an ssl mysql connection=
00:44 <****> the problem is only with the jdbc stuff?
00:45 <****> yeah, i don't know
00:45 <****> i seem to have everything wired, but if i was to guess, i'd blame it on the certificate setup
00:46 <****> id blame it on the jdbc setup
00:46 <****> seen this? http://dev.mysql.com/doc/refman/5.0/en/windows-and-ssh.html
00:46 <****> just for a test?


Total 22 pages. You are browsing page 1/22.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo