An index will not remove the requirement for the order by clause, but it will make that origin much much faster. SQL select does not guarantee the order of the records by default, no matter what indexes you have in place. Some engines will default to order off addition, however, that all goes out of the window when rows are removed and or added.
Adding an index and using order by is the correct answer.
i’ve just pretrained a local model with some Xojo specifics’ by default most LLM will try to use VB when they see xojo Syntax, prompting with xojo will help if they have internet abilities. With a bit of tweaking you can get it pretty close.
EG how many would know that when using a temporary SQL table and applying an ORDER BY xxx SQL doesn’t necessarily keep the same order if you do a subsequent SELECT from the same table.
Now you post
which is at best misleading as, in fact, for a SELECT the order is not guaranteed from ANY table without an ORDER BY.
Hence my comment about the value of ChatGPT output.
We must not forget that these models are evolving rapidly and that the skills needed to create working code are a particular focus.
I personally have no doubt that we will soon see more and more projects in which large parts of the code have been created or at least optimized by machines. And if we Xojo developers ignore this, we will once again miss the boat…
Tim - I did specifically ask it about Temp tables so its answer is accurate for my purposes. As others have indicated it can be a very powerful tool so should not be dismissed, and it will only get better - I guess “trust but verify” is the right answer.
The open sources languages (Python) have an advantage with AI because there is so much code for the AI’s to examine. Developers in those languages have embraced the help of AI code assistants. They are getting better rapidly. IMO this is a very important direction for coding in the future. Code with AI assistance should be enabled as much as possible with Xojo.
Code with AI assistance will definitely accelerate development, but another important consideration is to also have the ability to deploy AI models as part of Xojo solutions (e.g. using something like ONNX).
If Xojo integrate something tied to some external tool, make sure we can turn it off and Xojo still works at the max offline, and also that such experiment is done in such way that it’s very easy for Xojo to remove it (like a plugin) once some “catch” show up from the provider of such service or the markets change to another new shine thing (or China thing).