Unix Technical Forum

Re: PhpBB 3.x query review

This is a discussion on Re: PhpBB 3.x query review within the Pgsql General forums, part of the PostgreSQL category; --> ----- Original Message ---- > From: Jean-Michel Pouré <jm@poure.com> > To: pgsql-general@postgresql.org > Sent: Monday, January 7, 2008 11:06:09 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:17 AM
Shelby Cain
 
Posts: n/a
Default Re: PhpBB 3.x query review



----- Original Message ----
> From: Jean-Michel Pouré <jm@poure.com>
> To: pgsql-general@postgresql.org
> Sent: Monday, January 7, 2008 11:06:09 AM
> Subject: [GENERAL] PhpBB 3.x query review
>
>
> I set indexes on ban_email, ban_userid and ban_ip.
> But the query plan is still the same.
>
> Any idea?
>


There is hardly any data in the table (~133 rows per page by my calculation) so the planner is choosing
to do a direct sequential scan instead of using an indirect lookup through an
index because it is faster. Considering the query returned in under 0.1ms I think you may be engaging in premature optimization by adding indexes to this table. If you expect that table to eventually contain many thousands of entries then an index might be prudent.


Regards,

Shelby Cain






__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com