Re: Joining 2 tables with 300 million rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Dec 8, 2005, at 5:01 PM, Amit V Shah wrote:

Hi,

The thing is, although it shows 0.15 seconds, when I run the actual query, it takes around 40-45 seconds (sorry I forgot to mention that). And then
sometimes it depends on data. Some parameters have very less number of
records, and others have lot more. I dont know how to read the "explan" results very well, but looked like there were no sequential scans and it
only used indexes.


The planner will look at the data you used and it may decide to switch the plan if it realizes your're quering a very frequent value.

Another thing that may be a factor is the network - when doing explain analyze it doesn't have to transfer the dataset to the client.

--
Jeff Trout <jeff@xxxxxxxxxxxxx>
http://www.jefftrout.com/
http://www.stuarthamm.net/




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux