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



Comments:

<0> Oops. Sorry didn't mean to paste over multiple lines.
<0> Hence I can't fill the IN clause from the user function.
<1> can I backup a database from the mysql shell?
<2> hehe, nice sql move on todays thedailywtf.com
<3> hi all, i know i should rtfm, but it's rather long :). how can i allow jon@localhost access, using p***word=NO ?
<4> archivist: Then I will get the first 30 people after the sort. I want to sort the first 30 people...
<5> did you read ALL that line
<0> Okay I seem to have scared everyone off.
<5> and "the first" is not a defined order
<4> archivist: Was that for me? I thought I did. If I order first I cannot see how LIMIT or subquery after will help...
<5> the storage order is not defined so you need to order by first
<6> .
<7> Narada: that doc's more than a year old.
<7> Narada: http://hashmysql.org/paste/viewentry.php?id=1843
<4> archivist: I thought auto_increment used the number above the highset index when inserting.. Is that not true?
<7> ruDDer: it ***igns the next number, but that doesn't tell you where in the table file the data is stored



<7> ruDDer: if you create rows with IDs 1, 2, 3, then delete row w/ id 2 and insert another one, then id 4 may well end up between 1 and 3
<4> pCarsten: if I have 4 records with id 1,2 and 4: Inserting a new one will get id 5 with auto_increment? Is that true?
<4> 3 records.. sorry
<7> yes. But that is just the value ***igned to that row. It doesn't tell you where that row will be stored within the table file
<7> so, presumably, in your example row 3 has been deleted before row 5 is created ==> row 5 may end up sitting between row 2 and 4
<4> pCarsten: Well I do not care about that. I just need to know that id 345 was created after record with id 344..
<0> pCarsten: Oh my god. If indeed functions can work with tables then I am saved. Thank you so much.
<0> pCarsten: Now I'm confused as to whether I should put my select in a function or sp :)
<8> hi
<8> i cant compile php5.1.4 with mysql5.0 support, can anyone help me
<8> ?
<4> pCarsten: Do you know how I can select the records with the 30 lowest id valus and then sort these by another column? i.e. lastname.
<7> ruDDer: you'll need to use either a temp table or a subquery
<4> pCarsten: This doen't work: "SELECT per_lastname FROM person WHERE per_lastname IN(SELECT * from person LIMIT 0, 30) ORDER BY per_lastname;" How can I rewrite it. Very grateful for an answer :-)
<0> pCarsten: was there a more recent book written from those pdfs?
<7> ruDDer: select per_lastname from (select id, per_lastname order by id limit 30) order by per_lastname
<7> ruDDer: select per_lastname from (select id, per_lastname order by id limit 30) _t order by per_lastname
<9> hi
<9> its possible i add a user and give privileges to that user can have 2 databases?
<7> MalMen: one GRANT per database
<7> Narada: not that I know of. I have pinged Peter Gulutzan and asked him to either remove the pdf or update it
<4> pCarsten: I needed to add an alias to the table to get it to work, but still pCarsten: You saved my day! Thanks!
<7> hopefully, he'll update it :-)
<7> ruDDer: you'll want to rewrite it to something like the one I showed you - your version is horribly inefficient
<9> ! grant per database
<9> anyone can give to me a tut plz?
<7> !m MalMen grant
<7> hm.. bot still in coma
<4> pCarsten: Which version do you use?
<7> MalMen: dev.mysql.com/grant
<9> tks
<7> ruDDer: whatever is on the machine that I use :-)
<7> ruDDer: which is anything from 3.23.something and up
<4> pCarsten: But is it like you would like to recommend me to change my version from mysql 5.0.16?
<7> ruDDer: don't fix it if it aint broke
<7> oh
<7> ruDDer: by "your version" I mean the SQL that you used
<10> hey i'm getting an error when trying to load a database backup, admittedly the versions are different i am trying to add it to mysql 4.0 but latin1 as far as i can tell is supported on that. this is the error: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENGINE=MyISAM DEFAULT CHARSET=latin1"
<4> pCarsten: Thanx again. Now i'm leaving to celebrate the norwegian national day by eating hot dogs and drinking beer...
<4> pCarsten: Yes (I don't own it :-))
<11> hi, what is the right table type for for the following layout: id (int) primary key auto_increment, name varchar(255), index (name(6)). about 7 million rows, only inserts and selects of the type select id from names where name="bla", no updates, no deletes.
<2> probably myisam.
<11> infi: thats what I thought, too. but right now (~700000 rows) it beginning to get slow (~40 ms select time)
<11> inserts are still fast < 1 ms
<2> sounds like you might benefit from longer indexes. use EXPLAIN SELECT ... for your various queries.
<11> maybe a sql database is not the best choice, but other db engines (like berkleydb) only allow me to search(select) me with the primary key, not with the data column.
<11> infi: its exactly 2 types of queryies, "select name from names where id=x" and select id from names where name="bla".
<12> Sash: you can create an index for this in BDB.
<12> Sash: have keys that begin with n the name ones, and those that begin with i the id ones.
<12> Sash: you can also use XBase or whatever.
<11> rindolf: wouldn't double this the amount of hdd space and modifications on inserts? just to name a number, I'm talking about a total of about 300 million+ rows total. I already splitted it into multiple tables.
<12> Sash: well you can make sure that "n" . $name points only to the id.
<12> Sash: if you create an index in MySQL (which you should) then this index will also occupy space on the disk.
<11> rindolf: I already have an index.
<11> otherwise it might take a bit longer than 30 ms :)
<12> Sash: then it already occupies space. There ain't no such thing as a free lunch.
<11> rindolf: true, but I want to keep it as cheap as possible.
<12> Sash: so make sure that the columns pointed to by the name only contain the id, and only the id contain the rest of the data.
<12> s/columns/records/
<12> So it will be a virtual index.



<11> rindolf: how do i make such an index?
<11> is it just an alter table add index()?
<12> Sash: no I'm talking in the context of BDB or whatever.
<12> Sash: CREATE INDEX in MySQL.
<11> ah, sorry I misunderstood you.
<13> hey folks
<12> erwan_taf: hi.
<13> What kind of I/O does mysql ? is it set a O_DIRECT by default or not ?
<12> erwan_taf: have you looked at the source?
<13> hey rindolf
<13> not yet
<13> but I can
<12> erwan_taf: then it's the best advice I can give you as I'm not familiar with the MySQL internals.
<13> rindolf: I can check for the current release but I don't know the history, maybe this have been changed from mysql 3 to mysql 5
<13> it sounds like the configure is able to detect if the O_DIRECT is present or not
<13> ok, in mysql 5, only bdb could use O_DIRECT
<14> hi
<14> i've got a problem with C and MySQL! if client reconnects because of a call to mysql_ping(), my prepared statements lost. how can i avoid this?
<15> how do I rename field in table?
<15> i found: http://dev.mysql.com/doc/refman/4.1/en/alter-table.html
<2> yes.
<2> krnl`-: I would imagine it doesn't cache the prepared statement across connections.. use a transaction in innodb with autocommit off, and make your code detect a dropped connection and resubmit the query if the connection has dropped. that's just code logic.
<13> does innodb the default engine ?
<2> ml1: alter table is what you want. what isn't working?
<2> erwan_taf: no, MyISAM is.
<14> infi, i'm using it from a fast cgi app, so i have to check before all the page requests!
<16> this is a fairly noob Q.. but how would i represent (any string)fixedString in regxp?
<11> krnl`-: you are using fast cgi? did you ever have segfaults when using the shutdown() glibc call?
<16> like *.mp3 if i wasn't clear enough.....
<2> so? all it should be would be a comparison statement, boiling down to about 5 bytes worth of opcodes in machine code. it should be lightning fast.
<2> ^ krnl-
<14> Sash, why u use shutdown in fastcgi?
<14> what do your script have to do?
<14> exit from current request or the whole program?
<11> krnl`-: the lib does it internally and segfaults (every 2nd request) but let us take this out of #mysql
<13> infi: but my configure says "checking for Innodb... Using Innodb
<13> ".
<16> nobody know regular expression for anyString.fixedString
<13> infi: how should I interpret that ?
<2> erwan_taf: that it is building support into the executable.
<13> thx a lot
<13> I'm trying to understand if mysql uses O_DIRECT or not
<2> yeah, I saw that, I dunno.
<2> sometimes devs are in here I think, may try asking a bit later.
<13> infi: it looks like bdb, innodb and ndb are able to use O_DIRECT
<13> if "myisam" is the default, this is clear. mysql doesn't use O_DIRECT
<2> erwan_taf: but you can switch table types ..
<13> infi: you mean switching from myisam to innodb ?
<13> infi: this is selected by the configuration file isn't it ?
<2> no, in your CREATE TABLE statement with the ENGINE=foo syntax
<13> hum
<13> interesting
<2> I ***ume you can do it globally to change the default from MyISAM, but you can do it on a per-table basis, as well. how inflexible would it be to only allow one storage type globally on the entire database server?
<2> what if you needed to mix federated tables, MyISAM, InnoDB, BDB, temporary, etc?
<2> which many people do ...
<13> ok nice to know
<13> I was just wondering how the benchmark provided by mysql is using O_DIRECT or not
<13> My answer is, "look at the benchmark and watch the CREATE TABLE " ;)
<2> k
<13> thx a lot infi
<2> cheers
<13> infi: the benchmarks doesn't define any ENGINE=
<17> hi all
<17> how can i check from C if my mysql connection is still alive? my problem is that if i use mysql_ping() to reconnect, my prepared statements are lost!
<13> krnl: looks like you've already ask this question isn't it ? :b
<14> hmm :D yes i though its another server, sry :D:D
<2> erwan_taf: it used to be called TYPE=something
<13> infi: catch !
<13> infi: some tests are TYPE = INNODB
<13> thx infi !
<18> hm, nice, 550,000 SQL statements, zero errors.
<19> http://pastebin.com/722273 help
<5> conf_id= = what
<19> http://pastebin.com/722277


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

gentoo not syncing: VFS: unable to mount root fs mythtv
#perl
#perl
perl useless use of reference constructor
gentoo libssl.so corrupt
vesa-tng grub.conf
#perl
#web
inter-tel itpassw
rndc reload



Home  |  disclaimer  |  contact  |  submit quotes