« first day (1270 days earlier)      last day (1388 days later) » 

04:41
@TehShrike Does storing the whole contents in a single DB cause any issues ,Will that affect the insertion or retrieval speed ? I expect 20 million plus records every month.
Also I dint get why you just suggested an auto increamented primary key
?
 
9 hours later…
13:29
@Surabhil using a sequential primary key will reduce your insert times a good bit over using a primary key that causes it to have to look through the index and move rows around to insert new records
@Surabhil The number of columns in the table will have little effect
If you want to learn more about these kinds of details, check out High Performance MySQL
 
5 hours later…
18:25
@TehShrike How can get the count of a matched REGEXP in a grouped query?
select
    s.name `Store View`,
    date_format(u.visit_time, "%Y-%m") Period,
    count(distinct vi.remote_addr) `Unique Visits`,
    < count where vi.http_user_agent regexp 'bot|spider|w3c|validat|crawl|monitor|php' > `Visits from Bots`,
    count(1) `Total Visits`
from log_url u
inner join log_visitor_info vi
    on vi.visitor_id = u.visitor_id
inner join log_url_info i
    on i.url_id = u.url_id
inner join log_visitor v
    on v.visitor_id = vi.visitor_id
inner join core_store s
    on s.store_id = v.store_id
18:50
Something like SUM(vi.http_user_agent regexp 'bot|spider|w3c|validat|crawl|monitor|php') I imagine
19:14
Looks like it works. It thought that would add the values of the fields in that column though
Didn't know it could take an expression
 
2 hours later…
21:13
@SteveRobbins Yeah, SUM takes any value, which could be from a column in a row in a table, but not necessarily

« first day (1270 days earlier)      last day (1388 days later) »