Many thanks Igor.
Would this index be enough:
CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
(player1,player2)
Or do I need the opposite as well?
CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
(player2,player1)
Why I have two queries: the order of the arguments are
BareFeetWare wrote:
> On 12/06/2011, at 9:59 PM, Ian Hardingham wrote:
>> Once again, multiturnTable has a million rows, I have separate indexes on
>> complete and player1 and player2 (should I also add
>> an index on player1, player2?)
>
> Yes. Since your query
On 12/06/2011, at 9:59 PM, Ian Hardingham wrote:
> I often need to get the "record" between two people - how many games they've
> won and lost against each other. For reference, the query is
> SELECTcount(*) TotalGames
> , sum(score > 0) GamesWonByPlayer1
> , sum(score < 0)
Ian Hardingham wrote:
> Would this index be enough:
>
> CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
> (player1,player2)
>
> Or do I need the opposite as well?
>
> CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
> (player2,player1)
For the queries
Many thanks Igor.
Would this index be enough:
CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
(player1,player2)
Or do I need the opposite as well?
CREATE INDEX IF NOT EXISTS mtTablePlayer1 ON multiturnTable
(player2,player1)
Why I have two queries: the order of the arguments are
Ian Hardingham wrote:
> I often need to get the "record" between two people - how many games
> they've won and lost against each other. For reference, the query is at
> the end of the email. Once again, multiturnTable has a million rows, I
> have separate indexes on complete
Guys, my apologies for spamming the list today.
A topic I've talked about before, but am just revisiting.
I often need to get the "record" between two people - how many games
they've won and lost against each other. For reference, the query is at
the end of the email. Once again,
thanks,
i failed to notice that one, any way thanks for your replay
Jay Sprenkle <[EMAIL PROTECTED]> wrote:
On 1/19/06, manoj marathayil wrote:
> ok this i can do, but the problem is i need to select a set of records and i
> want to manipulate with each record then only i need to delete
On 1/19/06, manoj marathayil <[EMAIL PROTECTED]> wrote:
> ok this i can do, but the problem is i need to select a set of records and i
> want to manipulate with each record then only i need to delete that record
That's why I had it separated. Select the set into a temporary table.
Process the
ok this i can do, but the problem is i need to select a set of records and i
want to manipulate with each record then only i need to delete that record
Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 1/19/06, manoj marathayil wrote:
>
> hi,
> is there is any way so that i can store the result
> of
>
> I don't believe there is an option to "select into" in SQLite. So your
> first statement should probably be a "create as". Also, you should
> delete the temp table after the delete. Your solution should read like this:
Oops! Too many database syntax records in my head at the same time!
>
>
Jay Sprenkle wrote:
is there is any way so that i can store the result
of a select query and execute a delete query on the
same table with out using any other buffer?
How about:
select id
into temp_table
from source_table
where somecondition = true;
delete from source_table
where id
On 1/19/06, manoj marathayil <[EMAIL PROTECTED]> wrote:
>
> hi,
> is there is any way so that i can store the result
> of
> a select query and execute a delete query on the
> same
> table with out using any other buffer?
How about:
select id
into temp_table
from source_table
where
hi,
is there is any way so that i can store the result
of
a select query and execute a delete query on the
same
table with out using any other buffer?
T h a n k s & R e g a r d s ,
Manoj M | Webyog | Bangalore | Voice: 91 9886171984, 91 80 51216434(off)
"A winner is not one who never fails,
14 matches
Mail list logo