1 / 8

北京汉邦无限科技有限公司 -I2M 组 hamob i2m

InfoBright 测试报告. 北京汉邦无限科技有限公司 -I2M 组 http://www.hamob.com http://i2m.cn. 目 录. InfoBright 简介. 1. InfoBright 测试报告. 2. 展示部分查询 SQL. 3. InfoBright 简介. 什么是 infobright ? Infobright 是一个与 MySQL 集成的开源数据 仓库软件 ,可作为 MySQL 的一个存储引擎来使用, SELECT 查询与普通 MySQL 无区别 。 优点 :

Download Presentation

北京汉邦无限科技有限公司 -I2M 组 hamob i2m

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. InfoBright测试报告 北京汉邦无限科技有限公司-I2M组 http://www.hamob.com http://i2m.cn

  2. 目 录 InfoBright简介 1 InfoBright测试报告 2 展示部分查询SQL 3

  3. InfoBright简介 • 什么是infobright? • Infobright是一个与MySQL集成的开源数据仓库软件,可作为MySQL的一个存储引擎来使用,SELECT查询与普通MySQL无区别。 • 优点: • 查询性能高 --比普通Mysql数据库引擎 (MyISAM、InnoDB) 快5-60倍. • 存储数据量大 --能存储的数据量特别大. • 高压缩比 -- 与普通数据库存放的数据文件相比, 可以达到55:1 • 不需要建立索引 --省去了大量建立索引的时间.(对于我们非常有优势) • 缺点: • 不能高并发.最多10个并发 • Infobright分两个版本:社区版(ICE,免费)、企业版(IEE,收费),社区版在添加数据时,只支持load data , 而不支持.insert ,update ,delete . 企业版,则全部支持.

  4. InfoBright测试报告 单位 : 耗时/S, 测试数据量: 1000W

  5. InfoBright测试报告 原始数据库引擎.(Myisam) 建立索引 15:49 执行统计脚本,耗时25分钟. 省去了建立索引的时间. 00:40 执行统计脚本,耗时将近3个小时. 大部分时间都消耗在建立索引上.

  6. 数据类型&部分优化 推荐使用的数据类型: TINYINT , INT ,BIGINT ,DECIMAL(尽量减少小数点位数), DATE , TIME 尽量避免的数据类型: VARCHAR, FLOAT ,DOUBLE ,TINYTEXT, TEXT . 注意: int数据类型 最小 -2147483647, 最大2147483646. 尽量使用DECIMAL 代替Float. 尽量少用VARCHAR 尽量用CHAR 或者int来代替. 少用select * from table 这样的语句, 减少查询字段. 参考资料: http://blog.s135.com/infobright/ http://www.fhand.com/blog/archives/309.html http://t.cn/zOCd858 http://t.cn/zOCeC0P

  7. 查询SQL 查询新增用户数: select count(*) num from (select t.mobile from tbl_access_2012_04_11 as t ,webreport.tbl_user as u where t.ch = '20005' and t.mobile = u.mobile and u.logdate between '2012-04-11' and '2012-04-12' group by t.mobile ) as m; 酷站搜索量: select count(*) num from tbl_access_2012_04_11 where navid in (2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313,2314,2315,2316,2247,2248,2249,2250,2251,2429,2253,2255,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2271,2273,2274,2275,2276,2277,2278,2282,2515,2290,2291,2292,2293,2294,2295,2296,2298,2299,2300,2301,2302,2355,2356,2357,2358,2359,2360,2361,2362,2363,2365,2366,2367,2368,2370,2371,2372,2373,2374,2375,2376,2378,2379,2512,2513,2514,2328,2329,2330,2431,2333,2336,2337,2338,2339,2340,2342,2343,2506,2507,2279,2280,2281,2283,2284,2285,2286,2287,2288,2289,2435,2436,2510,2511,2317,2320,2320,2320,2321,2322,2323,2324,2325,2326,2327,2428,2432,2437,2520,2427,2380,2381,2382,2383,2384,2385,2386,2387,2388,2389,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2433,2505,2516,2224,2226,2228,2229,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2270,2440,2508,2414,2415,2416,2417,2420,2420,2420,2430,2349,2348,2347,2351,2350,2341,2344,2345,2346,2352,2353,2354,2434,2438,2439,2509,2474,2476,2478,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2475,2477,2479,2451,2452,2453,2454,2455,2456,2457,2458) and ch=20005;    查询总用户数: select count(a.mobile) from (select mobile,count(mobile) num from weblog2.tbl_access_2012_04_11 where ch = '20005' group by mobile) a where a.num=1; 查询老用户数: select count(a.mobile) from (select mobile,count(mobile) num from weblog2.tbl_access_2012_04_11 where ch = '20005'  group by mobile) a,webreport.tbl_user b where a.mobile=b.mobile and b.logdate < '2012-04-11' and a.num=1;   

  8. THANK YOU 北京汉邦无限科技有限公司-I2M组 http://www.hamob.com http://i2m.cn

More Related