First time here? Check out the FAQ!
asked 2012-05-26 18:56:50 +0200RichA
I am using Base to connect to a remote MYSQL database. One of the tables has about 4500 records.
I created a Base form to access this table. The form initially displays with the first 10 or so records. I performed a Search for the primary key of about the 500th record in the table and it took forever. I could see record numbers slowly incrementing--it seemed like it was retrieving one record at a time and checking the key field for the search value.
I then created an index on the table, to see if that would speed up the process. I did this directly on the MYSQL database itself, not going through Base. After that, Base still seemed to be looking record-by-record, perhaps ignoring the index and perhaps not knowing about the incex.
Is there any way to speed this up? Is there a way to get Base to use the index on the table when it searches?
I have some familiarity with MYSQL and Postgresql, but I am new to Base. I am trying to use it to create a front-end for some non-technical people who don't know SQL and just need to enter and access data.
Thanks very much.
Your right - the search function will always go record by record, and it will always retrieve the data into the actual data control you are searching (though in the background) - this is because search offers the ability to search for items as presented to the end user and offers the ability to search across multiple data fields.
As you found - filtering on the other hand actually generates a select statement in the background and issues that to the database, and is much faster then.
Be aware though that there is one other difference, the result set you are working with does not change with a search but does with a filter. A search changes the record cursor within the current result set, a filter generates a new and different result set.
answered 2012-05-26 19:23:55 +0200RichA
It looks like Form-based filters is what I need to use.
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-05-26 18:56:50 +0200
Seen: 168 times
Last updated: May 27 '12