SunnyBoy-WYH commented on issue #2325:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2325#issuecomment-1764670401

   > > 1. do we need store  slow log to file or just print it ? just use slf4j 
Logger?
   > > 2. hg support gremlin api & params api such as EdgeAPI/VertexAPI, they 
are different, do we need transform it when we record it( gremlin query 
language and params are different)?
   > > 3. i think we need set time threold、enabled、file path?like neo4j
   > 
   > 1. I think we could try log to specified `slow-log-file` first, then 
consider store in `DB` file next
   > 2. TBD
   > 3. Fine to set them
   > 4. we need more refer info from distributed database like `TiDB/HBase/NB` 
to compare the pros & cons
   
   TIDB :
   1. TiDB 将执行时间超过 
[tidb_slow_log_threshold](https://docs.pingcap.com/tidb/stable/system-variables#tidb_slow_log_threshold)(默认值为
 300 
毫秒)的语句输出到[慢查询文件](https://docs.pingcap.com/tidb/stable/tidb-configuration-file#slow-query-file)(默认值为
 “tidb-slow.log”)。
   
   2.TiDB 
默认启用慢查询日志。您可以通过修改系统变量[tidb_enable_slow_log](https://docs.pingcap.com/tidb/stable/system-variables#tidb_enable_slow_log)来启用或禁用该功能。
   
   record items(intro see ref 
https://docs.pingcap.com/tidb/stable/identify-slow-queries):
   
![image](https://github.com/apache/incubator-hugegraph/assets/48077841/77b00e01-cfc9-4d36-8274-3221195cb8a0)
   
   
HBase:(http://svn.apache.org/repos/asf/hbase/hbase.apache.org/trunk/0.94/book/ops.monitoring.html)
   HBase 慢查询日志由可解析的 JSON 
结构组成,这些结构描述那些客户端操作(获取、放置、删除等)的属性,这些操作要么运行时间过长,要么生成过多的输出。“运行时间太长”和“输出太多”的阈值是可配置的:
   
   1.hbase.ipc.warn.response.time在不记录查询的情况下可以运行查询的最大毫秒数。默认值为 10000 或 10 秒。可以设置为 
-1 以按时间禁用日志记录。
   2.hbase.ipc.warn.response.size查询在不记录的情况下可以返回的响应的最大字节大小。默认为 100 MB。可以设置为 -1 
以按大小禁用日志记录。
   
   示例:
   {
       "tables":{
           "riley2":{
               "puts":[
                   {
                       "totalColumns":11,
                       "families":{
                           "actions":[
                               {
                                   "timestamp":1315501284459,
                                   "qualifier":"0",
                                   "vlen":9667580
                               },
                               {
                                   "timestamp":1315501284459,
                                   "qualifier":"1",
                                   "vlen":10122412
                               },
                               {
                                   "timestamp":1315501284459,
                                   "qualifier":"2",
                                   "vlen":11104617
                               },
                               {
                                   "timestamp":1315501284459,
                                   "qualifier":"3",
                                   "vlen":13430635
                               }
                           ]
                       },
                       "row":"cfcd208495d565ef66e7dff9f98764da:0"
                   }
               ],
               "families":[
                   "actions"
               ]
           }
       },
       "processingtimems":956,
       "client":"10.47.34.63:33623",
       "starttimems":1315501284456,
       "queuetimems":0,
       "totalPuts":1,
       "class":"HRegionServer",
       "responsesize":0,
       "method":"multiPut"
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to