Bug Hunting Session
Bug 44954 - delegate search to the database
Summary: delegate search to the database
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 81541 (view as bug list)
Depends on:
Blocks: 51868 81541
  Show dependency treegraph
 
Reported: 2012-01-19 11:57 UTC by Lionel Elie Mamane
Modified: 2019-10-22 02:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
surching and filtering of data in LO (1.01 MB, application/vnd.sun.xml.base)
2012-07-08 07:34 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2012-01-19 11:57:55 UTC
Search within a database is done by downloading the data and looking inside it ourself. It would be far more efficient to give that work to the SQL engine, by a query like: SELECT primary_key FROM tableName WHERE searchCondition, and then just jump to the row with that primary_key (or download the whole row if one must).

That is not always possible. In particular, if the search option "Apply Field Format" is enabled, then we have to download the data and apply the format and then search ourselves. Same for "similarity search".

But SQL has even wildcard expressions ("LIKE" predicate), so other searches can go the the database.

This would be much faster: less network traffic, but also the database engine has indexes specially to make that operation faster!
Comment 1 Robert Großkopf 2012-07-07 23:33:23 UTC
You mean the search-function in the navigation-bar? Don't know if there is anybody who uses this function, becouse it is much to slow. Most people need only one textfiled and search in the whole database with "LIKE ...". This is much faster for the input and very much faster for the result.
Could be a good idea to make this feature faster.
I have set the Staus to "needinfo"

Robert
Comment 2 Lionel Elie Mamane 2012-07-08 04:53:38 UTC
(In reply to comment #1)
> You mean the search-function in the navigation-bar?

I mean:

 - "Find Record" in "Table Data" toolbar

 - "Find Record" in "Form Navigation" toolbar

> (...) it is much to slow.

That's exactly the point.

> Most people need only one textfiled and search in
> the whole database with "LIKE ...".

I'm not sure what you mean with "one textfiled".
Something like a CSV file as storage backend?

> This is much faster for the input and very much
> faster for the result.

If you mean "search with "LIKE ..." is the fastest,
after this enhancement is implemented, it would
probably be the slowest (with most database backends).

I'm curious how "search with LIKE" can be faster
than e.g. "search with =" even now; I'd expect it
to be slower or the difference so small as to not
be noticeable.
Comment 3 Robert Großkopf 2012-07-08 07:34:49 UTC
Created attachment 63974 [details]
surching and filtering of data in LO

Try the form "Suchabfrage". There is one textfield and a button. The input textfield is read by a macro with "CurrentValue". The table with the result is created in the macro.
I know, that "TABLE.FIELD LIKE ..." isn't so fast as "TABLE.FIELD = ...". But the result of this search trough over 8000 rows is much faster than a result is given through the internal search-function. You can try it in the form "Suchtabelle" with the button "search", which starts the search-function of the navigation-bar of a base-form.
Comment 4 Robert Großkopf 2012-07-08 07:45:24 UTC
How do we search in the internet? We put some words in a textfield and let the searching-machine do the rest. We do not know anything about fields of tabeles in the database.
The search-dialog of LO is a very slow construction. Normal user do not use it, because the using is too difficult.

A good seraching-tool must bring results in seconds, not in minutes. And a good searching-tool must run through forms and subforms - not only through one of them.
Comment 5 Lionel Elie Mamane 2012-07-08 08:37:06 UTC
(In reply to comment #4)
> How do we search in the internet? We put some words in a textfield and let the
> searching-machine do the rest. We do not know anything about fields of tabeles
> in the database.

I know understand that when you said
 "Most people need only one textfiled and search in
 the whole database with 'LIKE ...'"
you were talking about the search interface, and not about the data structure itself.

The effect you seek is achieved in the existing "Record Search" dialog by selecting:

 - Where to search: "All Fields"
 - Position: "anywhere in the field"

> The search-dialog of LO is a very slow construction.

That's exactly the point of this enhancement "bug". The fact that you felt the need to manually code (in StarBasic) (a variant of) the procedure the "Record Search" should be doing automatically under the hood kinda proves my point.

> And a good searching-tool must run through forms and subforms
> - not only through one of them.

That's an interesting idea, but somewhat orthogonal. IMHO it warrants its own "enhancment" bug report.
Comment 6 Jochen 2012-08-24 21:57:08 UTC
@Robert

(In reply to comment #5)
> I know understand that when you said
>  "Most people need only one textfiled and search in
>  the whole database with 'LIKE ...'"

CAn you please give an answer?
Comment 7 Robert Großkopf 2012-08-25 07:38:34 UTC
@Jochen

I don't know, what I should answer. The searching in forms ist very slow. Lionel described, why it's so slow. A little marco works much faster and searches trough all fields of a table.
This is a problem since Base exists - in OOo, and also the first versions of LO. As I understand bug-description it should be set to status "New".

So I don't need any info - it's a problem to search with the functions integrated in LO.

Searching in subforms is not possible in this moment. Lionel has created a new bug-description for this:
https://bugs.freedesktop.org/show_bug.cgi?id=51868
Comment 8 Lionel Elie Mamane 2014-07-21 05:13:17 UTC
*** Bug 81541 has been marked as a duplicate of this bug. ***
Comment 9 Alex Thurgood 2015-01-03 17:41:02 UTC Comment hidden (no-value)
Comment 10 QA Administrators 2016-09-20 09:41:49 UTC Comment hidden (obsolete)
Comment 11 Alex Thurgood 2017-10-16 07:31:13 UTC
(In reply to QA Administrators from comment #10)

Of course the problem is still there. It isn't a problem that is going to go away by itself. I really dislike mass bug pings like this. I understand why it is done, where, say, lots of regular development changes occur in a given module, but Base isn't one of them (unfortunately for all of us).

Anyway, reproducible in :

Version: 5.4.2.2
Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
Threads CPU : 4; OS : Mac OS X 10.13; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 12 QA Administrators 2018-10-17 02:49:22 UTC Comment hidden (obsolete)
Comment 13 Robert Großkopf 2018-10-21 16:00:59 UTC
Bug still exists with Version: 6.1.3.1 on OpenSUSE 15, 64bit rpm Linux.
Comment 14 QA Administrators 2019-10-22 02:31:48 UTC
Dear Lionel Elie Mamane,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug