#mysql - Sun 13 May 2007 between 21:38 and 22:27



arjenAUbeeyatch: oh, what also helps is normalisation. since it's a tablescan, it'd be best to not have lots of other columns in the table
js_: no. bad design
polo_Sapient, i found another way, something i overlooked earlier, another user.. thanks for all your help
hyakkiwhats the best data Type (longtext?)to use for lots of html?
and is there anyway to get the db size down?
beeyatcharjenAU: thanks for your help.
The table i do where like %% on is about 800mb+ big
arjenAUbeeyatch: not a good idea.
beeyatchi think using somekind of fulltext indexing system is a good idea
arjenAU: i cant avoid it
arjenAUyes you can. better design.
beeyatchjeh
arjenAUeither table design, or infrastructure
beeyatcheheh ;)
arjenAUit's not smth any RDBMS is fab at.
beeyatchhaving the whole db on ram would be cool :)
arjenAUalso nonsensical. but can be done.
CREATE TABLE blah ENGINE=MEMORY SELECT * FROM badtable;
make sure max_heap_table_size is suffciiently large
beeyatchits created alrdy
can i do it by alter?
arjenAUyou don't want the whole table in mem. its silly
beeyatchjeh true
arjenAUMEMORY can't deal with large textfields like that
beeyatchi have another idea to optimize it
its varchar 255
arjenAUand you dn't want the other stuff wth it
then in mem it's a CHAR 255. bad design anyway
beeyatchk
SELECT`key` FROM collections WHERE subject LIKE '%Spiderman.3.DVDR-Replica%' HAVING ((SUM(parts)/SUM(totalparts) * 100) > 95) LIMIT 1
oO :D
is HAVING (sum...) stuff slow?
arjenAUbeeyatch: having deals with the provisional resultset then tosses away rows that don't match.
beeyatch: whereas WHERE decides what to retrieve in the first place.
so HAVING is not pretty, as such. but someitmes necessary. like with SUM()
the LIMIT 1 looks odd also. why not just ORDER BY something DESC LIMIT 1
it's a very ugly query, and i reckon it's mostly the search that is the issue. you don't want to search like that
hydrozenhey, im running a query that returns the sum of a couple of colums (ex: select sum(col1), sum(col2), sum(col3)) ... what can I do if i also want to return the total of these sums??
NemesisDis there a way to use LIKE to match regular expressions or at least strings with wildcards?
nm i got it, its like SELECT * FROM t1 WHERE col REGEXP 'foo.*'

Page: 1 8 15 22 

IrcArchive