I'm trying to run the following SPARQL query, but it keeps returning `SR171: Transaction timed out`. 

```sql
SELECT ?isBusAvailable WHERE {
  SELECT DISTINCT IF (
  (
  SELECT ?value2 WHERE {
      GRAPH data: { ?obsValueID2 ontology:value ?value2 }
      GRAPH data: { ?obsValueID2 rdf:label "Availability" }
      GRAPH data: { ?obsValueID2 ontology:isObservedValueOf ?obsID2}
      GRAPH data: { ?obsID2 ssn:observationResultTime ?time2 }
      GRAPH data: { ?obsID2 ssn:observedBy ?id2 }
      GRAPH meta: { ?id2 rdf:label "MyBusService" } 
  } ORDER BY DESC (?time2) LIMIT 1) > 1, "Take Bus", (
                       SELECT ?isBikeAvailable WHERE {
                       SELECT DISTINCT IF (
                       (
                       SELECT ?value3 WHERE {
                            GRAPH data: { ?obsValueID3 ontology:value ?value3 }
                            GRAPH data: { ?obsValueID3 rdf:label "Availability" }
                            GRAPH data: { ?obsValueID3 ontology:isObservedValueOf ?obsID3}
                            GRAPH data: { ?obsID3 ssn:observationResultTime ?time3 }
                            GRAPH data: { ?obsID3 ssn:observedBy ?id3 }
                            GRAPH meta: { ?id3 rdf:label "MyBikeService" } 
                       } ORDER BY DESC (?time3) LIMIT 1
                       ) > 0, "Take Bike", "Take Taxi") as ?isBikeAvailable WHERE { ?1 ?2 ?3}})) as ?isBusAvailable WHERE { ?4 ?5 ?6}}

```

If I run them individually, it runs in under 1 second. The following example works. 

```sql
SELECT ?isBusAvailable WHERE {
  SELECT DISTINCT IF (
  (
  SELECT ?value2 WHERE {
      GRAPH data: { ?obsValueID2 ontology:value ?value2 }
      GRAPH data: { ?obsValueID2 rdf:label "Availability" }
      GRAPH data: { ?obsValueID2 ontology:isObservedValueOf ?obsID2}
      GRAPH data: { ?obsID2 ssn:observationResultTime ?time2 }
      GRAPH data: { ?obsID2 ssn:observedBy ?id2 }
      GRAPH meta: { ?id2 rdf:label "MyBusService" } 
  } ORDER BY DESC (?time2) LIMIT 1) > 1, "Take Bus", 'Take Bike') as ?isBusAvailable WHERE { ?4 ?5 ?6}} 

```

If the result from the first query is true, return 'Take Bus'; else, run the second query, and return either 'Take Bike' or 'Take Taxi'. 

Apparently the problem is with the second query (from the false condition on the first query). After "Take Bus", if I change the second query to "Take Bike", it works.