#mysql - Wed 25 Apr 2007 between 17:13 and 17:20



shimithe old box had 4.0.16-max, the new one is 5.0.26-log. on the way, I converted my local character set from windows-1255 into utf-8, though I don't think that one is related
vakjazzrocker, actually i'd need a DB driven by structure described in XML _queries_, not drven by how the data is _stored_.
DedParetGot a q: I'm using Perl DBI to talk to mysql, and getting an error. Is it impossible to use "?" in a subquery, and pass the value in thru execute(val)?
shimianyways, here's what EXPLAIN says:
+----+-------------+-------+-------+---------------+------+---------+------+--------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+---------------+------+---------+------+--------+-----------------------------+
| 1 | SIMPLE | news | range | dump | dump | 47 | NULL | 192826 | Using where; Using filesort |
+----+-------------+-------+-------+---------------+------+---------+------+--------+-----------------------------+
jazzrockervak: that doesn't make sense... the best answer i have to that comment is: then use XML, not a DB
fatpeltshimi: ugh... don't flood :)
jazzrockerewwww... shimi fucking pastebin
DedParet...specifically, $sth=$dbh->prepare("select * from mytable where id not in (select id from foo where fieldx = ?)");
fatpeltshimi: so yeah, you need to optimize that query
DedParet$sth->execute('bar')
jazzrockervak: http://en.wikipedia.org/wiki/Entity-Attribute-Value_model http://www.dbazine.com/ofinterest/oi-articles/celko22
shimithe where is the problem, or the order by? or both...
vakjazzrocker, OK, what backend could i use to sort all my XML stuff? :)
fatpeltshimi: the doc page on the explain talks about what it means for "using where; using filesort"
jazzrockervak: C? Perl? PHP? Ruby? Python? anything that has an XML lib
vak: even something that doesn't (you could write your own)
vakjazzrocker, i'd like some (half-) ready stuff, don't want to write things from scratch
Leithal_DedParet: $sth->bind_param(1, 'bar'); $sth->execute():
jazzrockervak: as i said: anything that's got an xml lib
Leithal_DedParet: and damn... use a left join...
jazzrockerleft join
join
...
!man left join
the_wenchsee http://dev.mysql.com/doc/refman/5.0/en/join.html
shimiok here's the thing. the query selects all rows that have one of two "genre" values (with OR) and sorts according to unixtime column, descending. now I have the following index: genre,unixtime. That used to do the trick... I think. where am I wrong?
vakjazzrocker, thanks
DedParetleithal: ...I can use a left join, when I want to find those ids which *don't* show up in the second table?
jazzrockervak: sure... i still don't even know what you're doing, so who knows if my advice is right
vak: my guess is that you're better off storing your data in XML
vakjazzrocker, ok, but then i need search through the certain fields of this XML, like it were a DB. is there any advanced engine for that already?
fatpeltshimi: is the genre,unixtime index called 'dump' ?
jazzrockervak: not all data benefits from storage in a relational DB... relational data does... hierarchical data does not... excessively variable data doesn't either (e.g. data sets that routinely have wildly varying property values for the same data type... e.g. as pointed out in the EAV article: medical records, or manufacturing processes)
Leithal_DedParet: that is the beauty of left joins
shimiyes

Page: 5 12 19 26 33 40 47 54 61 68 75 

IrcArchive