Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: need to spe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 11 Topic 4048 of 4352
Post > Topic >>

Re: need to speed up query

by justin@[EMAIL PROTECTED] (Justin) May 6, 2008 at 12:36 AM

yes the cross join is intentional.

Thanks creating the two column index drop processing time to 15 to 17 
seconds
put per period down to 1 second



Scott Marlowe wrote:
> You're joining these two tables: period, accnt, but I'm not seeing an
> on () clause or a where clause joining them.  Is the cross product
> intentional?
>
> But what I'm seeing that seems like the lowest hanging fruit would be
> two column indexes on the bits that are showing up in those bit map
> scans.  Like this part:
>
> "                      Recheck Cond: ((gltrans_date <= $3) AND
> (gltrans_date >= $0) AND gltrans_accnt_id = $1))"
> "                      Filter: gltrans_posted"
> "                      ->  BitmapAnd  (cost=38.90..38.90 rows=10
> width=0) (actual time=0.839..0.839 rows=0 loops=1729)"
> "                            ->  Bitmap Index Scan on
> gltrans_gltrans_date_idx  (cost=0.00..8.08 rows=382 width=0) (actual
> time=0.782..0.782 rows=5872 loops=1729)"
> "                                  Index Cond: ((gltrans_date <= $3)
> AND (gltrans_date >= $0))"
> "                            ->  Bitmap Index Scan on
> gltrans_gltrans_accnt_id_idx  (cost=0.00..30.57 rows=1908 width=0)
> (actual time=0.076..0.076 rows=574 loops=798)"
> "                                  Index Cond: (gltrans_accnt_id = $1)"
>
> You are looking through 574 rows in one column and 5872 in another.
> But when they're anded together, you get 0 rows.  A two column index
> there should really help.
>
>   

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 11 Posts in Topic:
need to speed up query
justin@[EMAIL PROTECTED]   2008-05-05 21:01:49 
Re: need to speed up query
scott.marlowe@[EMAIL PROT  2008-05-05 21:27:03 
Re: need to speed up query
justin@[EMAIL PROTECTED]   2008-05-06 00:36:36 
Re: need to speed up query
Gregory.Williamson@[EMAIL  2008-05-05 22:08:35 
Re: need to speed up query
justin@[EMAIL PROTECTED]   2008-05-06 00:48:29 
Re: need to speed up query
lists@[EMAIL PROTECTED]   2008-05-06 09:02:42 
Re: need to speed up query
justin@[EMAIL PROTECTED]   2008-05-06 08:22:02 
Re: need to speed up query
lists@[EMAIL PROTECTED]   2008-05-06 18:35:16 
Re: need to speed up query
justin@[EMAIL PROTECTED]   2008-05-06 12:41:55 
Re: need to speed up query
sthomas@[EMAIL PROTECTED]  2008-05-06 11:43:29 
Re: need to speed up query
justin@[EMAIL PROTECTED]   2008-05-06 12:22:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 9:35:33 CDT 2008.