@# 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



Comments:

<0> 100 rows, time to execute is 16s, when the subquery or the updatequery without the subquery takes a few ms: update Orders set custId = (select id from Customer where oldCustId = Orders.oldCustId);
<1> can anyone take a look at this? http://hashmysql.org/paste/viewentry.php?id=1851
<2> its not enough, lol
<2> its a 2.1 GB db
<3> Ickmund: is there an index on oldcustid?
<0> shabbs: Nope.
<3> Ickmund: try adding it then, in the customer table
<0> shabbs: Will do!
<4> hey al
<4> how can i fix this problem when trying to restore mysql DB?
<4> ERROR 1062 (23000) at line 3640: Duplicate entry '????' for key 1
<0> shabbs: Ok, that stripped about 16s of the time... ;)
<0> shabbs: Thanks, need to read up on this index-thingy I guess... :P
<5> Ickmund: before you do anything, ask mysql to explain your query so you can see what's going on
<3> Ickmund: basically without the index it had to look through the entire customer table to find the matching row, for every row in the outer query. this way it can find it directly without having to look at the whole table
<4> anyone?



<4> ERROR 1062 (23000) at line 3640: Duplicate entry '????' for key 1
<6> what gets stored in ibdata1?
<7> I wonder what collation to use. Now i got utf8_polish_ci, but wonder whether to switch to utf8_unicode_ci - my database would support many languages then. Do you think it's good idea for european languages?
<8> twinge, your innodb data for all dbs
<6> thx
<9> zimnyx_: ibdataN files combined are The Tablespace in InnoDB engine
<7> salle: are you sure it's to me?
<9> zimnyx_: I'm sure it's NOT for you :)
<9> zimnyx_: Sorry ..
<10> =)
<3> zimnyx_: if there is a possibility you'll need other languages then it's a good idea
<11> hello... is there someone here who can explain MYSQL_ROW to me... The mysql C API is pretty hard to understand (for a newbie)
<10> tryggvi: MYSQL_ROW is a buffer with all data
<11> I am forced to use mysql for C at school (on a GNU/Linux system) but I'm programming in C++
<10> tryggvi: you just... read it :)
<11> I am cast row[nr] into a string
<10> I'm not sure that'd work ;-)
<10> use proper functions
<11> hmmm...
<10> it's not an array of values, it's just ROW
<11> but it says that MYSQL_ROW is an array of strings
<11> I can print it with printf("%s", row[1])
<11> so in some way it should be a string...
<10> ergh, riight
<11> normally I would try to google it... but I do not have much time now...
<10> mea culpa, was thinking about lower level
<10> so yes, everything there is a string
<7> shabbs: why utf8_unicode_ci isn't default, but utf8_general_ci, while it works not as well (fo rpolish for example)
<11> being a C library they probably mean char*
<3> zimnyx_: I honestly don't know enough about charsets to tell you :)
<9> zimnyx_: _general_ is simpler and therefore faster
<10> zimnyx: utf8_unicode is more complex
<12> hi all
<13> ok instead of showing the value returned from a select statement I want to show another value. for example if field = 1 I want to show "ONE" if field = 2 I want to show "TWO" how might I do that?
<10> !m brontos control flow
<14> brontos: (Control Flow Functions) : http://dev.mysql.com/doc/mysql/en/Control_flow_functions.html
<13> domas thanks! I was using a case but I was forgetting the end
<15> domas: , salle, shabbs: thanks.
<16> can I create a database containing '-' in the name? (fg-login) ?
<12> hei dudes, to avoid that two persons use the same nickname
<12> i need to use unique constraint on the field nickname
<10> kioto: you are absolutely right!
<17> hi there
<17> I have a table with an auto_increment PK, when I INSERT new rows, is there a way to get the PK value for the just inserted row?
<16> will[werk]: ?
<17> I just had a look at the docs but couldn't find a reference to that.
<12> thank domas
<10> MorphWrk: select last_insert_id()
<18> MorphWrk: SELECT last_insert_id(); http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
<17> ah, probably didn't look in the right place.
<10> or just mysql_insert_id()
<12> but is useful to use C to retrieve data from mysql to create front-end
<10> in php
<17> I'm using the C api
<17> already :)
<10> kioto: there're somewhat 'quicker' languages for frontends than C :)
<17> makes things much easier :)
<17> I just didn't know what to look for, but last_insert_id sounds reasonable :)
<17> thanks for the pointers
<19> if you're using the c api use mysql_insert_id()
<17> hmm, do I have to issue another select or is there a function in the C api that returns that value, too? Doesn't seem to.



<17> lol
<17> I should look more carefully
<19> which the page xgc mentioned uses
<2> For dumping a 2.1 GB db, what value do I need to set for max_upload_packet and net_buffer_length? Do I need to change this or anything else for it?
<20> Which mysql statement would i want to use to just get a list of fields for a table?
<21> If my query is "SELECT col2 FROM table WHERE col1 = 'x'", does an index on (col1, col2) provide better results than an index only on (col1) for any reason, including disk seek time?
<22> xenon: DESCRIBE TABLE tablename;
<18> Xen0n: DESC tablename; or show create table tablename; or use INFORMATION_SCHEMA in 5.0.
<20> mendel, i know how to use DESCRIBE... but that returns one record per field :(
<22> Yes
<22> What did you expect?
<20> hmmm
<20> good point
<20> hmmm.... PHP has done it for me already >.<
<18> Xen0n: INFORMATION_SCHEMA allows you more flexibility. If you wanted for some reason to return the column list as one field, GROUP_CONCAT could be used.
<23> hi! is mysql "ipv6 ready"? :-)
<20> mysql_list_fields()
<23> (i would like to connect to mysql with ipv6 socket)
<20> Xgc, not running 5 :(
<18> Right. In that case, your solution is fine.
<20> bah!
<20> mysql_list_fields() just does a SHOW COLUMNS FROM $table anyway :(
<20> so... looks like i need to loop
<24> i htink this is a lost case, as i will most likely have to rewrite some code to do what i want, but just in case there's an SQL wizard in the house that could help me out ... http://pastebin.com/724579
<3> !m lepine group_concat
<14> lepine: (GROUP BY (Aggregate) Functions) : http://dev.mysql.com/doc/mysql/en/GROUP-BY-Functions.html
<20> hmmm
<20> I know what i am TRYING to do here, but cant do it...
<20> SELECT Field FROM (DESCRIBE $table);
<20> how do i nest statements?
<23> again : does mysql support ipv6?
<3> !man ipv6
<14> Nothing found.
<23> :-(
<24> shabbs thank you very much, off to do some reading!
<3> !google mysql IPV6
<14> mysql IPV6: http://archives.neohapsis.com/archives/mysql/2004-q3/0275.html
<20> how do i use this group_concat ?
<25> select group_concat(username) from users;
<20> right....
<25> try it
<20> does that mean i need to use a subquery then?
<25> i don't know
<20> because i need to get all of Field from DESCRIBE table
<25> ah
<25> what do you need?
<20> i need a field list for a table
<20> but just a single row , really
<20> i dont need all the output of DESCRIBE
<26> :)
<25> i'm not sure how to do that, since it's not a select
<25> but i suppose it can be done
<20> and getting mysql to do it would take less processing time than a loop in PHP, i feel
<25> yeah, well. doesn't really matter all that much, i suppose
<3> how many fields do you have?
<20> erm, could be anything up to 30-40
<20> thats just for my uses... could potentially be much more
<20> if someone else used it in a larger project
<3> *shrug* I don't think doing a 30-40 or even 200 count loop within php is much to worry about
<20> it is if i end up doing it a lot...
<25> i don't know how to use describe in a select / subselect
<3> well, then upgrade to 5 and use the information_schema database
<27> w00t .. i managed to walk into two book stores .. and not buy anything!
<28> how do i restart the MySQL Service under linux?
<3> how do you restart your other services?
<28> i don't, yet.. I'm a newbie
<25> /etc/init.d/mysql restart ?
<28> thankyou.
<28> now i know how its done :)
<27> RANK() OVER (<query partition clause> <order by clause>)
<27> now thats one sweet feature
<24> shabbs: , is group_concat in 4.0 ?
<24> it is


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

#perl
xfce4 openembedded
#css
delicious cigarette smoke
mergefb beryl
rcalsasound reload
error unknown command escape mysql
debian reinstalltion
#css
#debian



Home  |  disclaimer  |  contact  |  submit quotes