同一个数据库同时查询但不同的结果? [大查询]

时间:2015-03-18 15:15:10

标签: mysql sql select group-by google-bigquery

我正在使用Google Big Query对数据集执行一些mysql类型查询。两个查询几乎相同(它们的区别仅在于使用SELECT检索的2列的排序,所有其他参数/​​条件都相同)但是当它们在同一数据库上一个接一个地执行时它们给出两个不同的输出。我是BigQuery和MySQL的初学者。请帮助。

查询和结果如下:

QUERY 1:

SELECT web100_log_entry.snap.MinRTT AS rttval,
       web100_log_entry.connection_spec.remote_ip AS rip
FROM [measurement-lab:m_lab.2010_01]
WHERE IS_EXPLICITLY_DEFINED(connection_spec.client_geolocation.continent_code)
  AND IS_EXPLICITLY_DEFINED(web100_log_entry.log_time)
  AND IS_EXPLICITLY_DEFINED(connection_spec.client_geolocation.country_code)
  AND IS_EXPLICITLY_DEFINED(web100_log_entry.snap.MinRTT)
  AND web100_log_entry.log_time > 1262304000
  AND web100_log_entry.log_time < 1262476800
  AND connection_spec.client_geolocation.continent_code='EU'
  AND connection_spec.client_geolocation.country_code='FR'

QUERY 2:

SELECT web100_log_entry.connection_spec.remote_ip AS rip,
       web100_log_entry.snap.MinRTT AS rttval
FROM [measurement-lab:m_lab.2010_01]
WHERE IS_EXPLICITLY_DEFINED(connection_spec.client_geolocation.continent_code)
  AND IS_EXPLICITLY_DEFINED(web100_log_entry.log_time)
  AND IS_EXPLICITLY_DEFINED(connection_spec.client_geolocation.country_code)
  AND IS_EXPLICITLY_DEFINED(web100_log_entry.snap.MinRTT)
  AND web100_log_entry.log_time > 1262304000
  AND web100_log_entry.log_time < 1262476800
  AND connection_spec.client_geolocation.continent_code='EU'
  AND connection_spec.client_geolocation.country_code='FR'

结果1:

+------------+---------------+
|   rttval   |      rip      |
+------------+---------------+
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
| 4294967295 | 92.161.77.187 |
+------------+---------------+

结果2:

+-------------+------------+
|     rip     |   rttval   |
+-------------+------------+
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
| 82.233.86.3 | 4294967295 |
+-------------+------------+

1 个答案:

答案 0 :(得分:2)

你在这里粘贴的只是结果的第一个显示页面,总共有3254299行,它们的顺序不同(即使同一个查询可以按不同的顺序排列),因为没有ORDER BY子句