Question: I understand from my recent use of PHP-PDO over the last few months that you can do a PREPARE statement and then run the query. In fact I can see the usefulness of this if I'm going to either SELECT on a complex join, varying the where conditions, a repeated number of times.

Or, similarly, if I was wanting to insert multiple records.

However, if I know I only want to run a statement once, shouldn't I just EXECUTE the query? I'm basically querying the database twice.

Answer: 
You actually can create a Set object pretty easy (in contradiction to GoZoner, there is a built in contains method):

```
class Set<T : Equatable> {
    var items : T[] = []

    func add(item : T) {
        if !contains(items, {$0 == item}) {
            items += item
        }
    }
}

```

and you maybe even want to declare a custom operator:

```
@assignment @infix func += <T : Equatable> (inout set : Set<T>, items : T[]) -> Set<T> {
    for item in items {
        set.add(item)
    }
    return set
}

```
So I think creating a Set with an array is a terrible idea - O(n) is the time complexity of that set. 

I have put together a nice Set that uses a dictionary: <https://github.com/evilpenguin/Swift-Stuff/blob/master/Set.swift>