#mysql
05 October 2007
Total 19 pages. You are browsing page 2/19.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
01:09 <****> Enterprise Tape Library?
01:11 <****> extracting, transforming and loading data
01:11 <****> (data warehousing stuff)
01:14 <****> can someone explain what count(1) or count(n) does?
01:38 <****> _dinosaurus: COUNT(1) is like COUNT(*) as it counts every row in the result set. COUNT(n) counts every non-null n.
01:41 <****> dose a subselect have to run for each row in is select
01:42 <****> *it's
01:43 <****> so say i did select * from a where a.b_id in (select id from b WHERE something)
01:43 <****> would select from b have to be ran for every row of a or just once ?
01:44 <****> kury_71: Not necessarily.
01:45 <****> oh and something didnt have any row from a ... i fogot to mention that
01:45 <****> *anything
01:46 <****> is there a way to see what index myql actually uses when it runs a query, not just what EXPLAIN said it *might* do?
01:48 <****> in general tho would it just be better to make a session variable or something?
01:56 <****> I have a list of addresses (in identd@host format), and can do boolean searches on the field and get matches for things like *comcast, but not IP addresses.. is that just how fulltext works (no number matching)?
02:00 <****> How many rows could I reasonably expect to be able to have in a table with only an int ID col as an index, and about 9 string rows, before updates become slow or unusable? This is running 5.0 on a quad Opty+2GB.
02:00 <****> hi i'm having trouble getting mysql to run as a normal user, can anyone suggest some documentation?
02:01 <****> (A guess in the range of the closest number of zeroes is all I'm after)
02:02 <****> I only ask becuase I have a table which has filled about 90k rows in about 10 minutes, and it'll continue to grow at the same rate.
02:02 <****> Akashra: do you need to read or update this data often?
02:03 <****> it'll never be updated, only inserted; it'll be read every now and then, we're talking maybe once a day.
02:04 <****> the table contains log entries, which have timestamps etc on them, but are not indexed... the kind of queries would use a timestamp range to pull data from... I'm well aware that'll make selects really slow.
02:06 <****> At this rate we're looking at about 14 million rows per day, so I think I might need to do something to cut it down.
02:08 <****> have you looked at all at using the ARCHIVE engine?
02:08 <****> selects will be pretty terrible there, but it still might work well for you
02:08 <****> nope, but I'll do that.
02:08 <****> thanks.
02:09 <****> what kinda data you logging?
02:09 <****> im just curious
02:10 <****> java logging.
02:10 <****> webapp?
02:10 <****> actions?
02:11 <****> it's just a java.util.logging class with a mysql/jdbc driver I've written, since we don't use log4j (for various reasons). there's a few apps.. a webapp is one, a few daemons which sit watching for events processing data...
02:11 <****> because 14million rows a day is a lot of logging
02:11 <****> 14 mil doesn't seem excessive for some things
02:12 <****> not sure a relational db is the best answer though :)
02:12 <****> in future I want the database to go on a cluster of at least 4 systems, I've asked for 8 but I don't think it'll happen.
02:12 <****> depends on usage, i guess
02:12 <****> is this right: ALTER TABLE User ADD COLUMN SignupDate DATE DEFAULT CURDATE();
02:12 <****> ?
02:13 <****> I've got no problem deleting rows or archiving them to another table etc periodically either, but I'll certainly look into that archive engine stuff you mentioned.
02:13 <****> and check partitions
02:14 <****> if you want a cluster, you definitely want 5.1 at least
02:14 <****> is there a shorthand to select a row from a table and reinsert it only changing one or two fields?
02:14 <****> or do I have to specify all the fields?
02:14 <****> UPDATE TableName SET FieldName = Value
02:15 <****> WHERE Something = SomeOtherThing
02:15 <****> prakriti, using that, you don't have to select anything
02:16 <****> you can just update what you want
02:16 <****> I need help with an ALTER TABLE query
02:16 <****> lattera : i am not trying to update the table
02:16 <****> can someone help me?
02:16 <****> or I would use update. :)
02:16 <****> prakriti, sorry, misread
02:17 <****> I think you can do a SELECT inside your INSERT query
02:17 <****> can you add columns to mysql?
02:17 <****> is there a way to run two queries on two fields, and have one set of combined results with no duplicates? (i.e. a LIKE on one field, and MATCH AGAINST on another)
02:17 <****> yeah I do, and a select * would be easy... but i cant really change values in that
02:17 <****> so i would have so specify select field,field,'something' as field,field
02:17 <****> Hi all. I have a table, with a timestamp field - I want to see how many entries per hour are in the table using the timestamp field. I know I can do it like "select count(id) from mytable where month(calldate)='10' and day(calldate)='02' and year(calldate)='2007' and hour(calldate) IN(13);" but that would require 24 requests to the server from my app. I'm not a sql expert, but I'm sure there is a more efficient way to do this. Any
02:17 <****> and i want to avoid that
02:18 <****> Wuher : select distinct
02:18 <****> yeah, I'm not really sure
02:18 <****> lattera you cant use a function as a default value
02:18 <****> kury_71, how would I get a default value on a DATE field then?
02:19 <****> you dont unless you want it to be constent ...
02:19 <****> so I have to include it in every UPDATE query?
02:20 <****> yah
02:20 <****> hrmmm
02:20 <****> interesting
02:20 <****> can I use NOT NULL at least?
02:21 <****> prakriti: you could write some stored procedure that would consult information_schema and only override certain fields in the SELECT
02:21 <****> or you could just have your app do that
02:22 <****> i think so yah if its not null it will set it to 0000-00-00 if you dont give it a value but IS NULL on a date of 0000-00-00 returns true
02:22 <****> does no-auto-rehash in the my.cnf not work properly? if i insert it into my my.cnf then mysqld can't start
02:23 <****> majmun: put it in the [mysql] or [client] section of your my.cnf file...
02:23 <****> i did so, but mysqld doesn't want to start then
02:23 <****> Hi all. I have a table, with a timestamp field - I want to see how many entries per hour are in the table using the timestamp field. I know I can do it like "select count(id) from mytable where month(calldate)='10' and day(calldate)='02' and year(calldate)='2007' and hour(calldate) IN(13);" but that would require 24 requests to the server from my app. I'm not a sql expert, but I'm sure there is a more efficient way to do this. Any
02:23 <****> prakriti: how do I combine the two queries though? I want to do a MATCH AGAINST on text, but LIKE on address. My current query is: "SELECT from_unixtime(time), event, name, text FROM logs WHERE MATCH($search_fields) AGAINST ('$search_string' IN BOOLEAN MODE) ORDER BY time DESC LIMIT 200"
02:23 <****> mysqld[30433]: 071005 2:25:46 [ERROR] /usr/sbin/mysqld: unknown option '--no-auto-rehash'
02:24 <****> i'm using 5.0.48
02:24 <****> majmun: in what section of your my.cnf file did you put the option?
02:24 <****> you've put it in the wrong section
02:24 <****> just below [mysqld]
02:24 <****> ah
02:24 <****> ok, so, like i said, don't put it there :)
02:24 <****> !man option files
02:24 <****> see http://dev.mysql.com/doc/refman/5.0/en/option-files.html
02:28 <****> okay, thank you
02:28 <****> ahm, btw. is it possible to modify version or version_comment?
02:30 <****> i get an error with this http://pastebin.org/4144 query, what can be wrong?
02:35 <****> open_files_limit = somenumber doesn't have any effect for mysqld...i put it into [mysqld] and the value is always the same: 65536
02:35 <****> no matter if i use 262144 or 256...it's always 64k
02:49 <****> can someone take a look at the error and statement in this pastebin... it works fine on two wamp (windows) servers, but not on the webhost linux server
02:49 <****> http://pastebin.ca/726257
02:54 <****> baalwww: Perhaps ORDER BY SumQty DESC, p.ProductName ?
02:55 <****> the order by would throw a group error?
03:00 <****> seekwill: the version I'm getting the error on is 4, the version I'm not is 5...was there a syntax change?
03:00 <****> hello
03:00 <****> hi
Total 19 pages. You are browsing page 2/19.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
