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



Comments:

<0> and put it into a variable
<0> is it possible ?
<1> xiaogil: you need to at least make some db connection
<2> xiaogil: http://www.day32.com/MySQL/tuning-primer.sh has a good example of that.
<3> TodoInTX: tested the 4.x and 5.x
<0> .sh mean it's a bash commands script ?
<3> TodoInTX: My understanding is that only one index is use dper join.
<2> xiaogil: yep
<3> TodoInTX: how does adding a separate index for the second key in the compound index help?
<2> the join will use 1 index but the where uses anothe.
<1> anyone have some good sites for mysql server performance tuning/tweaking
<3> TodoInTX: that's a helpful suggestion.
<0> TodoInTX: this script is a bit complicated...
<0> TodoInTX: what i need is probably more simple
<4> anybody familiar with table change in MySQL, im really not getting this right :-)
<3> TodoInTX: please help me understand how the where uses a separate index. The query is "select * from t1 join t2 using (col1) where col2 ...



<3> sorry.
<3> Let's do that again: select * from t1 join t2 using (col) where t1.col1 = 37 and t2.col2 between something
<3> It will select all t1 rows where t1.col1 = 37. Let's say we get 6 rows back, which is typical for my example.
<2> it will do a range operation on t2.col2 then join using t2.col=t1.col
<3> Then it needs to do 6 queries into t2, using the compound index to find all rows that match.
<3> Why wouldn't it do the join first?
<2> then it will do a range to find t1.col1 = 37.
<3> Then it would use the second column of the compound index to resolve the range.
<2> do an explain on your query and do "show index from " for each of your tables and put that in a pastebin
<5> if I have 2 columns in a table, "id" and "parent" is it possible to select by id, then recursively select the parent id within one query
<2> timkay: it tries to limit the number of rows that it has to join first.
<2> if you do "where t1.id = N and t1.parent = N" then a multipart index would work just fine.
<5> I'll want it to go up through as many parents as are available though
<2> xiaogil: look for the function "mysql_variable" or "mysql_status"
<6> is there anyway to do a recursive query in MySQL?
<2> indigoblu: are you trying to do "ALTER TABLE" ?
<6> for example, if i had a table with ID and PARENT columns, and i supplied ID=5 > it would return the record with ID=5, then the record with PARENT=5, then the record with PARENT=(ID of the last result), etc?
<5> Smirker_L: I was just asking the same thing lol
<6> haha
<6> crookedi: did you get an answer?
<4> TodoInTX, trying to change field name from one thing to another
<7> is it possible to ***ign a null value to ao column?
<8> hey
<5> not the answer I was looking for
<8> I installed mysql
<4> TodoInTX, im installing phpymadmin so this should make things ez
<7> or basically, can i delete the value in a column?
<8> and now I'm getting the error: Host 'localhost' is not allowed to connect to this MySQL server.
<8> any idea how to fix that?
<7> IamEthos: have you checked your permissions?
<8> well
<8> I could access it fine
<8> but I changed the username and p***word from the defaults in the users table
<9> !tell Smirker_L about trees
<10> Alrighty.
<8> so I can't even get PHPMyAdmin to work
<2> indigoblu: it's "alter table table modify fname firstname definition(val);"
<11> !tell airox about trees
<10> Alrighty.
<11> :)
<3> TodoInTX: I updated the document with the info you requested and some comments: http://www.writely.com/View.aspx?docid=baccf6xnntdtb
<9> !tell crookedi about trees
<10> Alrighty.
<12> timkay: is there no result for the 3 times in pd2?
<3> TodoInTX: I really want it to join the device table first because the ultimate query is more complicated with another table joined on the end. Doing the sample table first doesn't work out.
<3> TodoInTX: why won't it use device_id_occurred to resolve the query quickly?
<2> if it is the most unique index it will.
<13> what is the command to list names of all databases on the current server?
<3> TodoInTX: note: the "t" column was added recently. I am going to replace datetime with unix_timestamp to see if that helps.
<12> spundun: show databases;
<14> .
<3> TodoInTX: do you agree that it should be able to resolve the join quickly regardless of the order? There are enough indexes to do it.
<13> dp: thanks
<6> is there a 'LastRecordReturned' element?
<12> Smirker_L: how do you mean?
<3> TodoInTX: I didn't fill in all the pd2 numbers because the missing ones weren't necessary.
<2> I would want to see the query and the "show indexes" from the table first.
<3> TodoInTX: you have the query and the show indexes there too. Look a the top of the new stuff.
<15> what are the *.myd files?
<0> How to SELECT the first element of a table whatever its reference is ?
<6> as in, if it returns a row, the last row it returns will go into an element or variable



<16> QbY: data files
<15> inviso.. what would make one go to 0 size?
<16> xiaogil: you don't
<16> QbY: no data perhaps?
<15> i thad data
<15> then it died
<0> inviso: you mean, it's not possible ?
<0> with a single command
<16> xiaogil: It doesn't make sense. You want the "first" row? "first" by what condition?
<0> invisio: i want the first row
<15> invisio.. I'm getting : ERROR 1016: Can't open file: 'events.MYD'. (errno: 145)
<2> timkay: sorry didn't see that
<15> but the file is there; and has a file size of 688128
<0> invisio: the first in the order the table is
<16> xiaogil: but rows don't have an implicit order. First ordered by what?
<3> TodoInTX: np.
<16> !perror 145
<10> MySQL error: 145 = Table was marked as crashed and should be repaired
<0> invisio: using the current order
<16> !m QbY table maintenance
<10> QbY: (Table Maintenance and Crash Recovery) : http://dev.mysql.com/doc/mysql/en/Table_maintenance.html
<16> xiaogil: there isn't one.
<3> TodoInTX: It seems to me that the optimizer might be right to swap the order of the join based on the stats. It might actually speed up doing so, but only if it then chose the correct indexs to use.
<16> !m timkay explain
<10> timkay: (EXPLAIN Syntax (Get Information About a SELECT)) : http://dev.mysql.com/doc/mysql/en/EXPLAIN.html
<0> invisio: okay, thanks
<9> timkay you can force index
<16> xiaogil: to get the first row of a select with some order, add limit 1 to the end. But please don't rely on magically sorting
<0> inviso: i don't want any sorting, that's to use in a bash script
<9> xiaogil, next time you use it the "first" may be different after an insert
<16> xiaogil: then you don't have a "first row." You have 1 row that mysql magically decided was the first on that day. It might be affected by the weather, the mood of your cat or the cycle of the tides
<0> inviso: i know
<0> archivist: i know
<3> archivist: I can force the index, but I can't get it to use the whole index. I just updated the document.
<3> archivist: please see the last example, where it picks the right index but doesn't use all of it.
<3> archivist: I am referring to http://www.writely.com/View.aspx?docid=baccf6xnntdtb
<0> inviso: is there another argument like LIMIT 1 (which is about quantity) but about the position ?
<16> xiaogil: there isn't a position. It doesn't exist. It doesn't make sense. If you want temporal order, add a timestamp column and order by that
<16> xiaogil: but you apparently know that already
<9> he wants a cursor like paradox has hehe
<2> timkay: can you make a pastebin that has just the EXPLAIN and the SHOW INDEX ?
<2> timkay: the page is taking too long to render
<0> inviso: i got my answer => LIMIT x, y
<2> timkay: it's been over 10mins already.
<9> reload it works for me
<17> forgive me if this is a dumb question but I know you can query 2 table with something like: "SELECT * FROM hotel_details, images WHERE hotel_details.HotelID=images.HotelID Is there a way to do that with 3 tables?
<3> TodoInTX: very sorry.... It's been only 2 min since you requested a pastebin.. I'll do that now.
<8> does anyone know where I can get an unedited copy of the mysql users table data files?
<2> timkay: no it's been 10min trying to load your page.
<2> :)
<3> TodoInTX: I see. It's not my page; it's hosted by Writely. Sorry about that. Here is a pastebin: http://hashmysql.org/paste/viewentry.php?id=1434
<2> timkay: I just get --- "show index from device; +--------+----------.... " and a whole bunch of white space.
<2> here it is...
<2> nevermind
<9> !m IamEthos reset root
<10> IamEthos: (How to Reset the Root P***word) : http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html
<9> !m IamEthos securing
<10> IamEthos: (Securing the Initial MySQL Accounts) : http://dev.mysql.com/doc/mysql/en/Default_privileges.html
<17> forgive me if this is a dumb question but I know you can query 2 table with something like: "SELECT * FROM hotel_details, images WHERE hotel_details.HotelID=images.HotelID Is there a way to do that with 3 tables?
<18> Hello.
<5> lsailor: select * from t1,t2,t3 where t1.col = n and t1.col=t2.col and t2.col=t3.col; or something like that i think
<19> lsailor: inner join is faster
<18> Is it possible to do dynamic ORDER BY? I got fields: "isCompany", "companyName", "customerName". If company=0 i need to ORDER BY customerName, otherwise by companyName. Is it possible?
<19> select * from table1 inner join table2 on table1.field1 = table2.field1 inner join table3 on table2.field1 = table3.fields
<17> ty... i will have to read that for a bit.. i am new :)
<19> order by custoername, companyname.
<19> in that sequence
<18> frank-: but company has also customerName...
<18> both fields are filled.
<19> order by field1, field2, field3
<18> so i need explicity one ORDER BY or another
<19> why
<19> an ordered order by list is not adequate?
<18> no way.. when it is cpmpany i need to order by a companyName. when it is not company i need to order by customerName.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

albacker
#linux
wrong pslib lib version or lib not found
error code 0x080090006
#python
use esp instead of ebp
error zti nvidia
php6+$_get
#lisp
install f4l suse 10.1



Home  |  disclaimer  |  contact  |  submit quotes