This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
from random import randrange | |
from datetime import timedelta,datetime | |
def prepare_message(): | |
message = """<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" | |
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> explain select p.id,h.host,i.key_,p.clock,p.timestamp, | |
p.source,p.severity,p.value,p.logeventid | |
from hosts h inner join items i on h.hostid=i.hostid | |
right outer join proxy_history p on i.itemid=p.itemid | |
where p.id>21824754 order by p.id limit 10\G | |
*************************** 1. row *************************** | |
id: 1 | |
select_type: SIMPLE | |
table: p | |
type: range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> explain select p.id,h.host,i.key_,p.clock,p.timestamp, | |
p.source,p.severity,p.value,p.logeventid | |
from hosts h,items i,proxy_history p where h.hostid=i.hostid | |
and i.itemid=p.itemid and p.id>21824754 order by p.id limit 1000\G | |
*************************** 1. row *************************** | |
id: 1 | |
select_type: SIMPLE | |
table: p | |
type: range | |
possible_keys: PRIMARY,id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH temp_Pages (pId, pLangId,pParentId, pFriendlyUrl) AS | |
( | |
SELECT pId, pLangId, | |
pParentId, | |
CONVERT(NVARCHAR(200), | |
'http://' + | |
(SELECT e.siteName FROM cms_Sites e WHERE e.siteID=pSiteID) + | |
'/' + | |
(SELECT c.langShortName FROM cms_Languages c WHERE c.langID=pLangID) + | |
'/' + |
NewerOlder