1:
SELECT id AS ARRAY_KEY, name
FROM v2_regions
WHERE 1=1
AND active = 1
ORDER BY name ASC
-- 0 ms; returned 6 row(s)
2:
SELECT id AS ARRAY_KEY, name
FROM v2_donors
WHERE 1=1
AND active = 1
ORDER BY name ASC
-- 0 ms; returned 28 row(s)
3:
-- CACHE: 10m
SELECT id AS ARRAY_KEY, name
FROM v2_countries
WHERE 1=1
AND active = 1
ORDER BY name ASC
-- 1 ms; returned 246 row(s)
4:
SELECT id AS ARRAY_KEY, name
FROM v2_sectors
WHERE 1=1
AND active = 1
ORDER BY name ASC
-- 0 ms; returned 83 row(s)
5:
SELECT DBSIMPLE_ERROR_NO_VALUE
FROM v2_tenders t
LEFT JOIN v2_tender_donors td ON t.id = td.tender_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_donors d ON td.donor_id = d.id AND 1= DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_status tst ON t.id = tst.tender_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_all_statuses tast ON tst.status_id = tast.id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_locations tl ON t.id = tl.tender_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_countries c ON c.id = tl.country_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_sectors ts ON t.id = ts.tender_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_company tc ON tc.tender_id = t.id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_types tt ON t.id = tt.tender_id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_tender_all_types tat ON tt.type_id = tat.id AND 1=DBSIMPLE_ERROR_NO_VALUE
LEFT JOIN v2_sphinx_search tft ON tft.id = t.id AND 1=DBSIMPLE_ERROR_NO_VALUE
WHERE 1=1
AND t.last_modified_date <= DBSIMPLE_ERROR_NO_VALUE
AND t.last_modified_date >= DBSIMPLE_ERROR_NO_VALUE
AND t.posted_date <= DBSIMPLE_ERROR_NO_VALUE
AND t.posted_date >= DBSIMPLE_ERROR_NO_VALUE
AND t.last_approved >= DBSIMPLE_ERROR_NO_VALUE
AND tst.status_id = DBSIMPLE_ERROR_NO_VALUE
AND tst.status_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND tt.type_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND t.value >= DBSIMPLE_ERROR_NO_VALUE
AND t.value <= DBSIMPLE_ERROR_NO_VALUE
AND tc.company_id = DBSIMPLE_ERROR_NO_VALUE
AND ts.sector_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND t.id IN (DBSIMPLE_ERROR_NO_VALUE)
AND td.donor_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND c.region_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND tl.country_id IN (DBSIMPLE_ERROR_NO_VALUE)
AND (c.region_id IN (DBSIMPLE_ERROR_NO_VALUE) OR tl.country_id IN (DBSIMPLE_ERROR_NO_VALUE))
AND t.active =DBSIMPLE_ERROR_NO_VALUE
AND t.verified = DBSIMPLE_ERROR_NO_VALUE
AND tft.query = DBSIMPLE_ERROR_NO_VALUE
GROUP BY t.id
ORDER BY t.last_modified_date DESC
LIMIT DBSIMPLE_ERROR_NO_VALUE, DBSIMPLE_ERROR_NO_VALUE
SELECT SQL_CALC_FOUND_ROWS `t`.`id`, `t`.`name`, `t`.`last_modified_date`, `t`.`close_date`, `tat`.`name`AS `type`, `d`.`name`AS `donor`, `tast`.`name`AS `status`
FROM v2_tenders t
LEFT JOIN v2_tender_donors td ON t.id = td.tender_id AND 1=1
LEFT JOIN v2_donors d ON td.donor_id = d.id AND 1= 1
LEFT JOIN v2_tender_status tst ON t.id = tst.tender_id AND 1=1
LEFT JOIN v2_tender_all_statuses tast ON tst.status_id = tast.id AND 1=1
LEFT JOIN v2_tender_types tt ON t.id = tt.tender_id AND 1=1
LEFT JOIN v2_tender_all_types tat ON tt.type_id = tat.id AND 1=1
WHERE 1=1
AND t.active =1
AND t.verified = 1
GROUP BY t.id
ORDER BY t.last_modified_date DESC
LIMIT 0, 10
6: -- 515 ms; returned 10 row(s)
SELECT FOUND_ROWS()
7: -- 0 ms; returned ('16710')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 64186
8: -- 0 ms; returned ('22')
SELECT `name` FROM v2_countries WHERE `id` IN ('22')
9: -- 0 ms; returned ('Algeria')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 64109
10: -- 0 ms; returned 59 row(s)
SELECT `name` FROM v2_countries WHERE `id` IN ('19', '22', '26', '31', '35', '36', '38', '40', '42', '43', '50', '51', '54', '60', '65', '67', '68', '70', '76', '77', '80', '87', '88', '108', '116', '117', '118', '124', '125', '128', '131', '132', '133', '141', '142', '145', '152', '153', '172', '173', '180', '182', '184', '185', '190', '192', '194', '197', '199', '204', '206', '209', '213', '225', '226', '230', '240', '241', '246')
11: -- 1 ms; returned 59 row(s)
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 64143
12: -- 0 ms; returned ('22')
SELECT `name` FROM v2_countries WHERE `id` IN ('22')
13: -- 0 ms; returned ('Algeria')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 49254
14: -- 0 ms; returned ('123')
SELECT `name` FROM v2_countries WHERE `id` IN ('123')
15: -- 0 ms; returned ('Macedonia')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 63310
16: -- 0 ms; returned ('171')
SELECT `name` FROM v2_countries WHERE `id` IN ('171')
17: -- 0 ms; returned ('Russia')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 63118
18: -- 0 ms; returned ('108')
SELECT `name` FROM v2_countries WHERE `id` IN ('108')
19: -- 0 ms; returned ('Kenya')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 63053
20: -- 1 ms; returned 5 row(s)
SELECT `name` FROM v2_countries WHERE `id` IN ('19', '40', '88', '142', '173')
21: -- 1 ms; returned 5 row(s)
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 62984
22: -- 0 ms; returned ('103')
SELECT `name` FROM v2_countries WHERE `id` IN ('103')
23: -- 0 ms; returned ('Jamaica')
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 62976
24: -- 1 ms; returned 7 row(s)
SELECT `name` FROM v2_countries WHERE `id` IN ('19', '40', '63', '87', '88', '142', '173')
25: -- 1 ms; returned 7 row(s)
SELECT `country_id` FROM v2_tender_locations WHERE `tender_id` = 62718
26: -- 0 ms; returned 7 row(s)
SELECT `name` FROM v2_countries WHERE `id` IN ('23', '30', '55', '105', '123', '139', '183')
27: -- 0 ms; returned 7 row(s)
SELECT *
FROM v2_sectors
WHERE 1=1
AND active = 1
ORDER BY name ASC
28: -- 1 ms; returned 83 row(s)
SELECT r.id as ARRAY_KEY_1, r.name
FROM v2_regions r
WHERE r.active=1
ORDER BY r.name
29: -- 0 ms; returned 6 row(s)
SELECT c.region_id as ARRAY_KEY_1, c.id as ARRAY_KEY_2, c.name, c.abbr
FROM v2_countries c
WHERE c.active=1
AND c.id != 246
ORDER BY c.name
30: -- 1 ms = 0+0+1; returned 245 row(s)
-- CACHE: 60m
SELECT DISTINCT(td.donor_id), d.*
FROM `v2_tender_donors` td
LEFT JOIN `v2_donors` d ON d.id = td.donor_id
ORDER BY d.name ASC
31: -- 1 ms; returned 35 row(s)