PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.
Moderator: Moderators
by js2002 » Mon Aug 23, 2010 1:09 pm
CREATE INDEX IDX_holdem_hand_player_statistics_id_player_real
on holdem_hand_player_statistics (id_player_real);
Is this command ok for the DB?
My tool searches with "where id_player_real = ..." so this could speed up a lot.
Do I have to do more to gain performance?
-
js2002
-
- Posts: 1501
- Joined: Fri Feb 15, 2008 5:44 am
- Location: Germany
-
by kraada » Mon Aug 23, 2010 1:24 pm
That shouldn't cause any problems, but don't forget to ANALYZE after you create the index. We've optimized our indices for our own queries, I don't know what else might help you with your tool.
-
kraada
- Moderator
-
- Posts: 54431
- Joined: Wed Mar 05, 2008 2:32 am
- Location: NY
by js2002 » Mon Aug 23, 2010 1:29 pm
Mainly its just one query. We cant go over id_player because wie read the playername in the HH and so whe need id_player_real. (Do u know a "cheaper" way f.e. to go over the alias system of PT3?!)
why this analyis command?
-
js2002
-
- Posts: 1501
- Joined: Fri Feb 15, 2008 5:44 am
- Location: Germany
-
by kraada » Mon Aug 23, 2010 2:40 pm
After adding the index you'll want the query planner to know it's there - it won't unless you run ANALYZE.
-
kraada
- Moderator
-
- Posts: 54431
- Joined: Wed Mar 05, 2008 2:32 am
- Location: NY
Return to PostgreSQL [Read Only]
Users browsing this forum: No registered users and 29 guests